diff --git a/Interfaces.md b/Interfaces.md index cec3960..176bce6 100644 --- a/Interfaces.md +++ b/Interfaces.md @@ -1,9 +1,9 @@ ## ggs_vm_runner
-ggs_vm_runner:start_link() -> GameVm -ggs_vm_runner:define(GameVM, SourceCode) -> ok -ggs_vm_runner:user_command(GameVM, User, Command, Args) -> ok +start_link() -> GameVm +define(GameVM, SourceCode) -> ok +user_command(GameVM, User, Command, Args) -> okOnly `start_link()` has a return value, the other two always return `ok`. @@ -19,3 +19,11 @@ handle_cast({game, Command, Headers, Data}, State) -> {noreply, NewState} - `Data` is just a String. - `server` and `game` are atoms to indicate the receiver. - `Command` is just a String. + +## ggs_protocol + +
parse(RawData) -> {Headers, DataString} +create(Headers, DataString) -> RawData ++ +- `Headers` are a proplist [[http://www.erlang.org/doc/man/proplists.html]] so you can use proplist:get_value(token) to get the value of the header "Token". \ No newline at end of file