All communication consists of messages that are one line of human-readable UTF-8 text optionally followed by a single newline and binary data. The protocol is not a request-response one. Messages may be sent in either direction at any time, either in response to some message, or spontaneously. For 'tile' messages, the client may send a bunch of tile requests without waiting for return messages. The server may send tiles proactively (guessing what the client might need). Etc. client -> server ================ canceltiles All outstanding tile messages from the client to the server are dropped and will not be handled. There is no guarantee of exactly which tile: messages might still be sent back to the client. disconnect [reason] Sent before disconnecting gracefully. reason: optional human-readable reason to disconnect. downloadas downloadas name= id= format= options= Exports the current document to the desired format and returns a download URL The id identifies the request on the client. getchildid Requests the child id so that it knows where the files needs to be sent when it is inserted in the document gettextselection mimetype= Request selection's content paste mimetype= Paste content at the current cursor position. insertfile name= type= Inserts the file with the name into the document, we currently support type = 'graphic' invalidatetiles part= tileposx= tileposy= tilewidth= tileheight= All parameters are numbers. Makes the server remove any cached tiles intersecting with the given area (in twips). key type= char= key= is 'input' or 'up', and are numbers. load Deprecated. load [part=] url= [timestamp=