Commit graph

21 commits

Author SHA1 Message Date
Jan Holesovsky
2d2fd83859 Document the timestamp= parameter in the protocol.txt. 2015-08-04 20:42:27 +02:00
Mihai Varga
2ebe9f1be1 loolwsd: format and options in 'saveas' are optional 2015-07-16 12:51:07 +03:00
Mihai Varga
675cfb8c4a loolwsd: send part names with the status message
Also disabled the status length assertion because part names
are separated by new-line characters ('\n')
2015-07-15 18:49:32 +03:00
Mihai Varga
e8007ea405 Server getTextSelection implementation 2015-06-24 18:08:15 +03:00
Tor Lillqvist
70b1e58f4c Typo 2015-06-09 18:29:55 +03:00
Tor Lillqvist
629ba87139 Add a "canceltiles" message to the protocol and handle it
Implementing this Was harder than I first expected. The basic idea is as
follows: The master process puts each message arriving from a client that
isn't "canceltiles" into a (client-specific) queue. A separate thread that
pulls messages from the queue at its own pace and handles them as
before. Incoming "canceltiles" messages are handled specially, though: The
queue is emptied of "tile" messages.

The above sounds simple but there are several details that were a bit tricky
to get right.
2015-06-09 18:29:48 +03:00
Tor Lillqvist
a608aaee90 Add an invalidate: message that is in LOOL style with named parameters
The invalidatetiles: message as generated directly from the
LOK_CALLBACK_INVALIDATE_TILES will be dropped soon.
2015-05-29 09:44:39 +03:00
Tor Lillqvist
bf985624f1 Handle LOK_CALLBACK_INVALIDATE_TILES in the server too
Remove any intersecting cached tiles. It is the parent process that handles
the tile cache, so it must look for invalidatetiles: messages, too, before
passing them on to the client. To know for which part we should remove tiles,
add an "ephemeral" curpart: message that the child process sends to the parent
process before the invalidatetils: message.
2015-05-28 18:48:51 +03:00
Tor Lillqvist
1d75eacd6a Add an invalidatetiles message from client to server
Mainly as a debugging aid to make it easier to check the tile cache invalidation
code, but might be useful for real, too.
2015-05-28 18:48:51 +03:00
Tor Lillqvist
5d9f5e715a Sort the messages in the sections 2015-05-28 18:48:51 +03:00
Tor Lillqvist
73273eb027 Also let the nextmessage: from a child process be forwarded to the client
The loadtest program needs it as it, too, uses Poco, which currently does not
have an API to receive an arbitrarily large WebSocket message.
2015-05-28 16:46:37 +03:00
Tor Lillqvist
058416b9d7 Handle arbitrarily large tile: messages from child to parent
The parent currently uses a fixed-size 100000 byte buffer to receive
messages. Even with a tile size of 256x256 pixels, that is not enough for some
tiles that compress badly as PNG. Add a nextmessage: message that gives the
size of the immediately following message. Send a such before each tile:
message, and handle it appropriately. The nextmessage: message is used only
from child to parent process, it is never sent to the Websocket client.

Once Poco 1.6.1 is released, this will not be necessary.
2015-05-18 11:24:32 +03:00
Tor Lillqvist
1b06290d2b Add a part parameter to the tile messages
The JS code always passes in 0 for now. The server parses the parameter and
calls LibreOfficeKitDocument::setPart() before calling paintTile().

Probably also the status, key, mouse and selection messages will need a part
number. The intent is after all that the protocol is as stateless as
possible. (So maybe we should also pass the document URL in each message?)
2015-04-27 21:30:26 +03:00
Tor Lillqvist
867a66aa62 A bit more info 2015-03-24 19:04:16 +02:00
Tor Lillqvist
97fbe8e857 Add 'saveas' 2015-03-23 22:14:11 +02:00
Tor Lillqvist
215fda0235 Add key and mouse event handling, uno command, and selection handling
Not "handled" here of course, just pass them on to LibreOfficeKit.
2015-03-20 13:18:01 +02:00
Tor Lillqvist
721d835c79 Also mention the communication between parent and child process 2015-03-20 13:18:01 +02:00
Tor Lillqvist
1a5e1b0fa4 Incorporate LOK_CALLBACK_* generically 2015-03-13 11:30:45 +02:00
Tor Lillqvist
bf611698b2 No need for a separate 'close' request
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.
2015-03-09 17:45:51 +02:00
Tor Lillqvist
a526b2faa2 Add the callbacks 2015-03-05 15:57:03 +02:00
Tor Lillqvist
0798c3d1ea Initial commit of loolwsd
See loolwsd/README for some notes.
2015-03-05 01:25:49 +02:00