Differences

This shows you the differences between two versions of the page.

development:blueprints:net_protocols [2010/03/11 09:56]
clsk
development:blueprints:net_protocols [2010/08/23 14:11] (current)
clsk
Line 8: Line 8:
===== Summary ===== ===== Summary =====
- 
===== Technical Notes ===== ===== Technical Notes =====
  * Empty spaces in front of messages are to be ignored.   * Empty spaces in front of messages are to be ignored.
-  * A message must ends with a New Line character (\n)+  * A message must end with a New Line character (\n)
  * Clients should NOT expect that only this number of parameters are to be given at all times.   * Clients should NOT expect that only this number of parameters are to be given at all times.
  * Clients should be able to add more parameters than expected even if they are not parsed. This will guarantee that old clients don't break in case extensions to the protocol are made. New parameters not included in this edition of the protocol are to be added to the end of the parameters list.   * Clients should be able to add more parameters than expected even if they are not parsed. This will guarantee that old clients don't break in case extensions to the protocol are made. New parameters not included in this edition of the protocol are to be added to the end of the parameters list.
-  * Message Tokens are command abbreviations used so that the server don't have to send explicit commands and save some bandwidth. This has been proved to be useful in IRC with thousands of clients connected. I believed we should take advantage of this.+  * Message Tokens are command abbreviations used so that the server doesn't have to send explicit commands and save some bandwidth. This has been proved to be useful in IRC with thousands of clients connected. I believed we should take advantage of this.
  * If a parameter has more than one word in it then it should be enclosed within quotation marks ("").   * If a parameter has more than one word in it then it should be enclosed within quotation marks ("").
Line 34: Line 33:
|  Login Success  |      LS    | Server | |  Login Success  |      LS    | Server |
|    Message    |      M      | BOTH  | |    Message    |      M      | BOTH  |
 +|    New Member  |      NM    | Server |
| Private Message |      PM    | BOTH  | | Private Message |      PM    | BOTH  |
 +|    Part Group  |      PG    | Client |
|    New Group    |      NG    | Client | |    New Group    |      NG    | Client |
| Group Accepted  |      GA    | Server | | Group Accepted  |      GA    | Server |
|      Group      |      G      | Server | |      Group      |      G      | Server |
 +|  Group Parted  |      GP    | Server |
|    Join Group  |      JG    | Client | |    Join Group  |      JG    | Client |
|  Group Joined  |      GJ    | Server | |  Group Joined  |      GJ    | Server |
Line 48: Line 50:
| Workplace List  |      WL    | Server | | Workplace List  |      WL    | Server |
| Workplace Desc. |      WD    | Server | | Workplace Desc. |      WD    | Server |
 +
==== Error Message (Token E) ==== ==== Error Message (Token E) ====
Line 113: Line 116:
[Client] M Mira "Welcome to Group Mira" [Client] M Mira "Welcome to Group Mira"
[Server] M clsk Mira "Welcome to Group Mira" 7898547 [Server] M clsk Mira "Welcome to Group Mira" 7898547
 +
 +==== New Member (Token NM) ====
 +This message is used by the server to let clients know that a client has joined a Workplace.
 +
 +<code>[Server] NM <username> <"Workplace"></code>
==== Private Message (Token PM) ==== ==== Private Message (Token PM) ====
Line 124: Line 132:
[Client] PM J_K9 "Hello J_K9, this is clsk"\n [Client] PM J_K9 "Hello J_K9, this is clsk"\n
[Server] PM clsk J_K9 "Hello J_K9, this is clsk" 75654198 [Server] PM clsk J_K9 "Hello J_K9, this is clsk" 75654198
 +==== Part Workplace (Token PG) ====
 +A client asking to leave a workplace
 +
 +<code>[Client] PG <workplace></code>
 +Server responds with:
 +<code>[Server] GP <username> <workplace></code>
 +
 +Note: Server will respond with WP to all workplace members.
==== New Group (Token NG) ==== ==== New Group (Token NG) ====
Line 148: Line 164:
__NOTES__: GroupMembers is a comma-separated list of usernames in that group. __NOTES__: GroupMembers is a comma-separated list of usernames in that group.
Examples of times where this message would be sent are: When a user logs in to the server, when an user joins a group . Examples of times where this message would be sent are: When a user logs in to the server, when an user joins a group .
 +==== Group Parted (Token GP) ====
 +A server responding to a PW message from a user
 +
 +<code>[Client] PG <workplace></code>
 +Server responds with:
 +<code>[Server] GP <username> <workplace></code>
 +
 +Note: Server will respond with GP to all workplace members.
==== Join Group (Token JG) ==== ==== Join Group (Token JG) ====
Line 201: Line 225:
If no Field=Value is passed then the server will show all users or groups. If no Field=Value is passed then the server will show all users or groups.
 +
 +==== PING (Token PI) ====
 +
 +A Client OR Server checking for response.
 +
 +<code>PI <ID></code>
 +The other end responds with a PONG (PO) message using the same ID
 +<code>PO <ID></code>
 +
 +//Example://
 +[Server] PI 25
 +[Client] PO 25
==== PING (Token PI) ==== ==== PING (Token PI) ====
Line 225: Line 261:
<code>WL [id:workplacename1],[id:workplacename2],[...]</code> <code>WL [id:workplacename1],[id:workplacename2],[...]</code>
- 
==== Workplace Description (Token WD) ==== ==== Workplace Description (Token WD) ====
This token is used by the server to send clients a workplace's description. This token is used by the server to send clients a workplace's description.
-<code>WD <;";Workplace Name"> <;";Workplace Description"></code>+<code>WD <Workplace Name> <Workplace Description></code> 
 + 
 +Note: In the Mira client and server implementation, this message is automatically sent to the client when requesting the workplace's utility list (WL).
-Note that workplaces are separated by commas. Because of this, workplace names that contain more than one word don't need to be enclosed by quotation marks. 
===== Example Conversation ===== ===== Example Conversation =====
 
development/blueprints/net_protocols.1268326605.txt.gz · Last modified: 2010/03/11 09:56 by clsk
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki