After connection is established, four types of packets are exchanged between client and server over the channel:
#'''Request:''' The client requests information from the server or requests it to perform an action.
#'''Reply:''' The server responds to a request. Not all requests generate replies.
#'''Event:''' The server informs the client of an event, such as keyboard or mouse input, a window being moved, resized or exposed, etc.
#'''Error:''' The server sends an error packet if a request is invalid. Since requests are queued, error packets generated by a request may not be sent immediately.
Request and reply packets have varying length, while event and error packets have a fixed length of 32 [[byte]]s.