i3/include
Orestis 5aa0459be0 Use ipc queue for all messages (#3585)
I was able to reproduce #3579 in Linux by running:
`sudo sysctl net.core.wmem_default=10000`

If a subscription message was too big to be sent at once, it was
possible to break a client by sending a reply to an other message sent
by the client. Eg:
- Write 8192 out of 11612 bytes of a workspace event.
- Blockingly write the reply to a workspace change message.
- Write the rest 3420 bytes of the workspace event.

This commit fixes this by utilizing the ipc queue for all types of
writes.

ipc_receive_message can only be called from a callback started in
ipc_new_client. This callback uses the same file descriptor with the
client also created in ipc_new_client. When the client is deleted, the
read callback is now also stopped. Thus, we can assume that whenever
ipc_receive_message is called, the corresponding client should still
exist.

- ipc_client now contains pointers to both write and read watchers. When
freed, a client will stop both of them.
- IPC_HANDLERs now work with ipc_clients instead of fds.

Fixes #3579.
2019-01-12 13:13:03 +01:00
..
2018-10-13 21:10:10 +03:00
2018-12-09 08:04:41 +07:00
2018-03-23 14:30:57 +02:00
2018-11-12 18:45:00 +02:00
2019-01-12 13:13:03 +01:00
2018-10-13 21:10:10 +03:00
2017-09-13 17:41:05 +02:00
2016-10-23 21:09:24 +02:00
2018-10-13 21:10:10 +03:00
2016-11-08 13:46:43 -08:00
2018-10-13 21:10:10 +03:00
2018-10-13 21:10:11 +03:00
2018-10-13 21:10:10 +03:00
2018-11-12 18:45:00 +02:00