User Tools

Site Tools


devel:network_protocol

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
network_protocol [2009-08-13 07:24] skyjakenetwork_protocol [2009-08-13 07:24] (current) – /* user.welcome (Update) */ skyjake
Line 1: Line 1:
 +{{stub}}
 +
 +This article describes the network packets used by [[libdeng2]], [[dengsv]], and [[dengcl]].
 +
 +
 +====== CommandPackets ======
 +
 +All CommandPackets will receive a reply in the form of a RecordPacket.
 +
 +
 +===== status =====
 +
 +Client sends this to query the server's status.
 +
 +Reply from server (server.status):
 +  *  Array of Numbers **version**: major, minor, patchlevel, revision.
 +  *  **sessions**
 +    *  **{session-id}**
 +      *  Dictionary of Text to Text **users**: user id ⇒ user name.
 +
 +
 +===== session.new =====
 +
 +Client sends this to create a new session on the server.
 +  *  Text **map**: map to load in the session's world.
 +
 +Reply:
 +  *  Text **id**: id of the created session.
 +
 +
 +===== session.delete =====
 +
 +Client sends this to destroy an existing session on the server.
 +  *  Text **id**: session id.
 +
 +
 +===== session.join =====
 +
 +Client sends this when it wishes to join a session in progress.
 +  *  Text **id**: id of the session.
 +  *  Block **userState**: state of the user.
 +
 +Reply from server:
 +  *  Text **userId**: user's id in the session.
 +
 +
 +===== session.leave =====
 +
 +Client sends this when it is leaving a session in progress.
 +
 +No reply.
 +
 +
 +====== RecordPackets ======
 +
 +
 +
 +===== user.welcome (Update) =====
 +
 +Sent to a client after it has been promoted to user in the session.
 +  *  Block **worldState**: state of the world.
 +  *  **users**
 +    *  Block **{user-id}**: state of user //user-id//.
 +
 +The user's own state is not included under **users**.
 +
 +
 +===== user.joined (Update) =====
 +
 +Sent after a client has been promoted to user in the session. Not sent to the promoted user.
 +  *  Text **id**: id of the user who joined.
 +  *  Block **userState**: state of the user who joined.
 +
 +
 +===== user.left (Update) =====
 +
 +Sent after a client has been demoted from the session. Not sent to the demoted client.
 +  *  Text **id**: id of the user who left.
 +
 +
 +===== session.ended (Update) =====
 +
 +Sent when the session ends on the serverside, signaling the user session to end as well.
 +
 +
 +
  
devel/network_protocol.txt · Last modified: 2009-08-13 07:24 by skyjake