Skip to content
Tomin1 edited this page May 8, 2012 · 4 revisions

Messaging protocol of Geekchat

This page is not completed and is subject to change

Message types

System message

:::SYSTEM:::<number><additional information>

  • where <number> is some number
  • and <additional information> is name or list of names in braces ([ and ])

These are used in connecting and disconnecting.

Regular message

<sender>:<color>:<receiver>:<message>

  • where <sender> is the user that sent the message
  • <color> is the color this message should be colored,
  • <receiver> is the user that should receive the message,
  • and <message> is the message that will be displayed

This is the type of messages that user sends

Command message (proposition)

/<command> <arguments>

  • where <command> is some command that server understands
  • and <arguments> are arguments for that command

These may be used by user and they are supposed to be sent unmodified. Client may use similar messages as it's own commands.

Other (proposition)

All other messages are information from server. They may be responds to command messages (described above).

Connecting

When client connects to server, client must ask if nickname is available:
:::SYSTEM:::3[<username>]
where <username> is the nickname user wants

If it is available server sends TRUE
otherwise server sends FALSE
After succesfully chosen username server sends this message to everyone else:
:::SYSTEM:::1[<username>]
where <username> is the name of connected user

Then server sends to the connected client list of connected clients:
:::SYSTEM:::4[<list of users>]
where <list of users> is comma (,) separated list of connected users

Now the client is ready to begin messaging.

Disconnecting

TBD

Commands

TBD