Project Fairdice |
[Home] [Docs] [Users] [Gaming] [Crypto] [Devel] [Download] [Help] |
Letter | Name | Description |
---|---|---|
F | Find | Find a remote app and connect or disconnect |
R | Remote | Remote tunneling to connect User and Host |
[Definition]
NEGOTIATION_MESSAGE
=
("F " FIND_STR) |
("R " REMOTE_STR)
;
these are defined in this file
[Definition]
FIND_STR
=
F_SET_USER | F_SET_SECRET | F_SET_SERVER | F_SET_HOST |
F_CONNECT | F_DISCONNECT | F_SHUTDOWN | F_YES | F_NO
F_SET_USER
=
"set user " USER_NAME
F_SET_SECRET
=
"set secret " PASSWORD
F_SET_SERVER
=
"set server " SERVER_ID
F_SET_HOST
=
"set host " HOST_ID
F_CONNECT
=
"connect"
F_DISCONNECT
=
"disconnect"
F_SHUTDOWN
=
"shutdown"
F_YES
=
"yes"
F_NO
=
"no" | "no " CONNECT_REFUSAL_MESSAGE
CONNECT_REFUSAL_MESSAGE
=
DISPLAY_STR
[Sequence]
Find string may only be sent once a user-client connection is properly
opened (ie after the link open sequence and describe sequence)
F_SHUTDOWN may only be sent from user to client, and only be sent once.
The F_SET_* strings may be sent multiple times (again, from user to client only).
The F_CONNECT may be sent (user to client) many times (as long as that
SERVER_ID and HOST_ID combination is not already open). It may only be
sent after at least one each of the F_SET_* commands has been sent.
The response from the client must be either F_YES or F_NO.
The F_DISCONNECT string may only be set if that SERVER_ID and HOST_ID
combination is already open.
[Example]
USER --> CLIENT W 001B F set user BenjaminDisraeli
USER --> CLIENT W 0016 F set secret CantGuess
USER --> CLIENT W 001C F set server localhost:22201
USER --> CLIENT W 0014 F set host Harry.Com
USER --> CLIENT W 0009 F connect
CLIENT --> USER W 0005 F yes
[Definition]
REMOTE_STR
=
LINK_ID " | " OPAQUE_STR
[Sequence]
A remote string may be sent or received any time the remote link identified
by the link_id is open.
The opaque data is sent, unedited by the client and server, to the host.
When received, it is as sent by the host.
[Example]
USER1 --> CLIENT1 R localhost:22201 ^ Harry.Com | [CHAT] Hi Steve, want to play a game?
CLIENT1 --> SERVER R [CHAT] Hi Ben, want to play a game?
SERVER --> HOST R WilliamGladstone | [CHAT] Hi Ben, want to play a game?
HOST --> SERVER R BenjaminDisraeli | [CHAT] Bill says: Hi Ben, want to play a game?
SERVER --> CLIENT2 R [CHAT] Bill says: Hi Ben, want to play a game?
CLIENT2 --> USER2 R localhost:22201 ^ Harry.Com | [CHAT] Bill says: Hi Ben, want to play a game?