bf611698b2
Having a 'close' would mean being able to do a new 'open', too, which introduces unneeded complexity, at least at this stage. Just start a fresh WebSocket connection for each document.
32 lines
750 B
Text
32 lines
750 B
Text
All communication consists of one line of human-readable UTF-8 text
|
|
optionally followed by a single newline and binary data.
|
|
|
|
client -> server
|
|
================
|
|
|
|
load <url>
|
|
|
|
status
|
|
|
|
tile width=<width> height=<height> tileposx=<xpos> tileposy=<ypos> tilewidth=<tileWidth> tileheight=<tileHeight>
|
|
|
|
server -> client
|
|
================
|
|
|
|
error: cmd=<command> kind=<kind>
|
|
<freeErrorText>
|
|
|
|
status: type=<typeName> parts=<numberOfParts> current=<currentPartNumber> width=<width> height=<height>
|
|
|
|
tile: width=<width> height=<height> tileposx=<xpos> tileposy=<ypos> tilewidth=<tileWidth> tileheight=<tileHeight>
|
|
<binaryPngImage>
|
|
|
|
invalidatetiles: <payload>
|
|
|
|
invalidatecursor:
|
|
|
|
textselection: <payload>
|
|
|
|
textselectionstart: <payload>
|
|
|
|
textselectionend: <payload>
|