SingleApplication/examples/sending_arguments
Francis Giraldeau f975da90cc Fix sendmessage (#46)
* Fix send message example

If a secondary instance sends a message immediately after connecting, the
message follows the init message. This causes the slotConnectionEstablished to
read and consume the tail of the message and interpret it as the checksum. The
checksum fails and the connection becomes invalid.

To avoid this race, we prefix the init message with its length. This way, we
consume only the data relevant to the init message.

This patch fixes the sending_arguments example.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>

* Fix include file case

Signed-off-by: Francis Giraldeau <francis.giraldeau@nrc-cnrc.gc.ca>
2018-07-27 02:10:14 +03:00
..
main.cpp Fix sendmessage (#46) 2018-07-27 02:10:14 +03:00
messagereceiver.cpp Added an example of an application sending it's arguments to the primary instance 2016-08-10 03:43:06 +01:00
messagereceiver.h Added an example of an application sending it's arguments to the primary instance 2016-08-10 03:43:06 +01:00
sending_arguments.pro Added an example of an application sending it's arguments to the primary instance 2016-08-10 03:43:06 +01:00