Started working on the new protocol

This commit is contained in:
Jonatan Pålsson 2011-02-02 21:19:33 +01:00
parent ae9034934e
commit f5fac06849
3 changed files with 58 additions and 30 deletions

View file

@ -98,6 +98,9 @@ do_JSCall(Socket, Data, State) ->
js_runner:define(JSVM, "function userCommand(cmd, par) {return cmd+' '+ par}"),
Parsed = ggs_protocol:parse(Data),
NewState = case Parsed of
{Token, define} ->
io:format("Got define!!\n"),
[];
{cmd, Command, Parameter} ->
% Set the new state to []
Ret = js_runner:call(JSVM, "userCommand",