- Protocol
- One JSON Dictionary transmitted as a string through ws or wss
- All Packets
- Fields
- "PacketType" - string
- Describes what type of packet this is
- "PacketID" - string
- Uniquely identifies the string transmitted
- "ProtocolVersion" - string
- Identifies the current version of the protocol being used
- "SessionID" - string
- Identifies the current user session
- Ignored for login packets
- "PacketType" - string
- Fields
- Packet Types
- "packet success": Either -> Either
- Fields
- "PacketReceivedID" - string
- Role
- Indicates that the described packet was received
- Fields
- "packet error": Either -> Either
- Fields
- "PacketReceivedID" - string
- "ServerError" - string
- Describes what error the server had
- Role
- Indicates packet failed
- Fields
- "malformed packet": Either -> Either
- Fields
- "PacketReceivedID" - string
- "PacketText" - string
- "Explanation" - string
- Role
- Shows what the server received
- Explains why the packet is malformed
- Fields
- "login": Client -> Server
- Fields
- "Username" - string
- "Password" - string
- Role
- Allows user to try to login
- Fields
- "login success": Server -> Client
- Fields
- "NewSessionID" - string
- Session ID to use for conversation
- "NewSessionID" - string
- Fields
- "login fail": Server -> Client
- Fields
- "update user list": Server -> Client
- Fields
- "OnlineUsers" - List[string]
- "OfflineUsers" - List[string]
- Sends an updated list of users to all clients when
- Fields
- "change contact list": Client -> Server
- Fields
- "Add" - bool (True is add, false is remove)
- "ContactUsername" - string
- Fields
- "contact update success": Server -> Client
- Fields
- "PacketReceivedID" - string
- Fields
- "contact update fail": Server -> Client
- Fields
- "PacketReceivedID" - string
- "UserExists" - bool
- "UserOnContactList" - bool
- Fields
- "ask for contact list": Client -> Server
- Fields
- "new contact list": Server -> Client
- Fields
- "NewContactList" - List[string]
- Fields
- "add to conversation": Client -> Server
- Fields
- "ConversationSessionID" - string
- Optional Field
- If empty the newly generated conversation id will be in add to conversation success / fail
- Optional Field
- "UsernameToAdd" - string
- "ConversationSessionID" - string
- Fields
- "add to conversation success": Server -> Client
- Fields
- "ConversationSessionID" - string
- "PacketReceivedID" - string
- Fields
- "add to conversation fail": Server -> Client
- Fields
- "ConversationSessionID" - string
- "PacketReceivedID" - string
- "UserExists" - bool
- "UserOnContactList" - bool
- "UserInConversation" - bool
- Fields
- "conversation member update": Server -> Client
- Fields
- "ConversationSessionID" - string
- "CommonContactList" - List[string]
- "UsersInConversation" - List[string]
- Fields
- "send message": Client -> Server
- Fields
- "ConversationSessionID" - string
- "MessageText" - string
- Fields
- "new conversation message": Server -> Client
- Fields
- "ConversationSessionID" - string
- "Message"
- Dictionary
- "Username" - string
- "Time" - string
- "MessageText" - string
- Fields
- "request conversation log": Client -> Server
- Fields
- "ConversationSessionID" - string
- Fields
- "conversation log": Server -> Client
- Fields
- "ConversationSessionID" - string
- "Log"
- list
- Dictionary
- "Username" - string
- "Time" - string
- "MessageText" - string
- Dictionary
- list
- Fields
- "exit conversation": Client -> Server
- Fields
- "ConversationSessionID" - string
- Fields
- "log out"
- Fields
- "packet success": Either -> Either
Last active
April 23, 2017 20:29
-
-
Save dbramucci/795683e5aedef8e5fc84ac1605fcdeef to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text between the quotes is exactly what is required for the protocol, copy paste it when you are implementing the message type and the fields for each method.