Starting erlang_js properly, and modified python_client tot start two sequential connections
This commit is contained in:
parent
79777e7b1c
commit
7267781b64
4 changed files with 8 additions and 5 deletions
|
@ -36,10 +36,6 @@
|
|||
start_link(Port) ->
|
||||
gen_server:start_link({local, ?SERVER}, ?MODULE, [Port], []).
|
||||
|
||||
start_link(start_as_slave, State) ->
|
||||
gen_server:start_link({local, ?SERVER}, ?MODULE,
|
||||
[start_as_slave, State], []).
|
||||
|
||||
start_link() ->
|
||||
start_link(?DEFAULT_PORT).
|
||||
|
||||
|
@ -125,6 +121,7 @@ do_JSCall(Socket, Data, State) ->
|
|||
{call, Token, Payload} ->
|
||||
io:format("Got call request: ~p~n", [Payload]),
|
||||
JSVM = getJSVM(Token, State),
|
||||
erlang:display(erlang:port_info(JSVM)),
|
||||
{ok, Ret} = js_runner:call(JSVM, Payload, []),%Payload, []),
|
||||
send(Socket, Token, "JS says:", binary_to_list(Ret));
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
|
||||
start() ->
|
||||
application:start(inets),
|
||||
application:start(erlang_js),
|
||||
application:start(ggs).
|
||||
|
|
Reference in a new issue