Port to process.

This commit is contained in:
Kallfaktorn 2011-02-13 16:44:11 +01:00
parent 3ccef1e711
commit 8c1fe0b4fd
2 changed files with 29 additions and 7 deletions

View file

@ -106,13 +106,13 @@ handle_cast({call, Token, Payload}, State) ->
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, []),
{ok, Ret} = js_runner:call(JSVM, Payload, []),
send(State#state.lsock, Token, "JS says:", binary_to_list(Ret)),
{noreply, State};
% Set the new state to the reference generated, and JSVM associated
handle_cast({hello, _, _}, State) ->
JSVM = js_runner:boot(),
JSVM = js_runner:boot(),
Client = getRef(),
send(State#state.lsock, Client, "This is your refID"),
OldMap = State#state.client_vm_map,