FriPoe - Protocol

 

FriPoe Protocol 0.1 Specifications

Below are the specifications for FriPoe Protocol 0.1. We encourage you to write your own clients in other languages and toolkits that communicate with the server.
You can also easily create your own rooms. Just follow the FriPoe rooms specifications on how to create a rooms file and put it in your local client directory or in the servers room directory.
################################################################################
                              FriPoe Protocol 0.1
################################################################################

--------------------------------------------------------------------------------
                                FIELD SEPARATORS
--------------------------------------------------------------------------------
- Commands to the server are separated by spaces
- Commands to thr client are separated by tabs

--------------------------------------------------------------------------------
                     HANDSHAKING NETWEEN SERVER AND CLIENT
--------------------------------------------------------------------------------
Both, server and client must send the protocol and version first,
before any other communication can be done.
These message is of the following structure:

PROTOCOL 0.1 (FriPoe Server 0.1.0)

If the server/client protocols are compatible, the server will send
a status message 210 to the client.
If the protocols are not compatible, the server will send a status 331
to the client and deny any further communication.

--------------------------------------------------------------------------------
                          LIST OF ALL CLIENT COMMANDS
--------------------------------------------------------------------------------
! All commands a case insensitive !

NICK <nickname>                        - sets nickname

MOVE <pieceNumber> <newX> <newY>       - Moves a piece on the board

JOIN <room number>                     - Joins a specific room number

LIST                                   - Shows available rooms

LEAVE                                  - leaves current room

BYE                                    - disconnects from server

. <chat message>                       - Sends chat message to the current room

+<nickname> <chat message>             - Sends a chat to the user <nickname>

--------------------------------------------------------------------------------
 LIST OF ALL POSSIBLE SERVER RESPONSES (excluding status messgaes, see STATUS)
--------------------------------------------------------------------------------

AddRoom <name> <desc> <xSize> <ySize> <words> <players> <background>
                   - Sent for each room of the server

Room <name> <desc> <xSize> <ySize> <words> <players> <background>
                   - Room description of the room that was entered

AddWord <ind> <word> <x> <y>
                   - Words added in a room. Send in the z-index order with
                     the top word first.

MoveWord <ind> <x> <y>
                   - Sent to every player in the room when a word is moved

UserList <name> <name> <name>...
                   - A list of users in the room when a player enters

AddUser <name>
                   - Sent when a player enters a room

DelUser <name>
                   - Sent when a player left the room

Chat <name> <message>
                   - A chat message sent from a user

UserChat <name> <message>	
                   - A chat message sent to a players from user name

--------------------------------------------------------------------------------
                  LIST OF CLIENT COMMANDS AND SERVER RESPONSES
--------------------------------------------------------------------------------

> NICK <nickname>
SERVER RESPONSE: STATUS ( 200 | 303 | 304 | 305 | 332 )

> MOVE <pieceNumber> <newX> <newY> 
SERVER RESPONSE: STATUS ( 302 | 321 | 322 | 323 )
                 'MoveWord <pieceNumber> <newX> <newY>'

> JOIN <room number>
SERVER RESPONSE: STATUS ( 301 | 311 | 322 )
                 or 'AddUser <name>' to all other clients in room
                 and 'Room', 'UserList' and 'AddWord' to new user

> LIST
SERVER RESPONSE: All room descriptions ('AddRoom' for each room)

> LEAVE
SERVER RESPONSE: STATUS ( 202 | 302 )
                 if 202, sends 'DelUser <name>' to other clients in room

> BYE
SERVER RESPONSE: 'DelUser <name>' to other clients in room if player in room

> . <chat message>
SERVER RESPONSE: STATUS ( 301 | 302 )
                 or Sends 'Chat <name> <message>' to the current room

> +<nickname> <chat message>
SERVER RESPONSE: STATUS ( 301 | 302 | 306 )
                 or sends 'UserChat <name> <message>' to the user

> PROTOCOL <client protocol> <(version)>
SERVER RESPONSE: STATUS ( 210 | 331 | 333 )
SourceForge.net Logo