Project Fairdice
[Home] [Docs] [Users] [Gaming] [Crypto] [Devel] [Download] [Help]

Fairdice Protocol v0.3 : Negotiation : Host-Server

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

Find

[Definition]
FIND_STR = F_SET_HOST | F_SET_SECRET| F_SHUTDOWN
F_SET_HOST = "set host " HOST_ID
F_SET_SECRET = "set secret " PASSWORD
F_SHUTDOWN = "shutdown"

[Sequence]
Find string may only be sent once a host-server connection is properly opened (ie after the link open sequence and describe sequence)

F_SHUTDOWN may only be sent from host to server, and only be sent once.

The F_SET_* strings may be sent multiple times (again, from host to server only).

[Example]
  HOST --> SERVER    W 0014 F set host Harry.Com
  HOST --> SERVER    W 0018 F set secret Unguessable
...
  HOST --> SERVER    W 0009 F shutdown

Remote

[Definition]
REMOTE_STR = USER_NAME " | " OPAQUE_STR

[Sequence]
A remote string may be sent or received any time the remote link identified by the user_name is open.

The opaque data is sent, unedited by the client and server, to the user.

When received, it is as sent by the user.

[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?


(
TOP)(UP)