Updated Interfaces (markdown)
parent
4c8e58815a
commit
7e39930d03
1 changed files with 5 additions and 7 deletions
|
@ -11,11 +11,9 @@ ggs_vm_runner:user_command(GameVM, User, Command, Args) -> ok
|
|||
handle_cast(stop, State) -> {stop, normal, State}
|
||||
handle_cast({server, hello, Headers}, State) -> {noreply, NewState}
|
||||
handle_cast({server, define, Headers, Data}, State) -> {noreply, NewState}
|
||||
handle_cast({game, command, Headers, Data}, State) -> {noreply, NewState}</pre>
|
||||
handle_cast({game, Command, Headers, Data}, State) -> {noreply, NewState}</pre>
|
||||
|
||||
- `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".
|
||||
- `Data` is just a String.
|
||||
- `Command` is just a String.
|
||||
|
||||
Headers is Build like:
|
||||
<pre>Headers = {
|
||||
token, "FDB59E46-07A2-40B0-B4DB-F3447F0E651B",
|
||||
size, 20,
|
||||
user_agent, "FunnyGame 2.2"
|
||||
}</pre>
|
Reference in a new issue