aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFrancis Giraldeau <francis.giraldeau@gmail.com>2018-07-26 19:10:14 -0400
committerItay Grudev <itay-grudev@users.noreply.github.com>2018-07-27 02:10:14 +0300
commitf975da90ccbb70b4dda4142be629e0b54841a71f (patch)
tree66d9f225b7aad8a6dad460286e10e8ae39ea19d3 /examples
parentreplace -lAdvapi32 with -ladvapi32 which broke the build on mxe (#43) (diff)
downloadsingleapplication-f975da90ccbb70b4dda4142be629e0b54841a71f.tar.xz
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>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/basic/main.cpp2
-rw-r--r--examples/calculator/main.cpp2
-rwxr-xr-xexamples/sending_arguments/main.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/basic/main.cpp b/examples/basic/main.cpp
index 4787d1c..1841902 100755
--- a/examples/basic/main.cpp
+++ b/examples/basic/main.cpp
@@ -1,4 +1,4 @@
-#include <SingleApplication.h>
+#include <singleapplication.h>
int main(int argc, char *argv[])
{
diff --git a/examples/calculator/main.cpp b/examples/calculator/main.cpp
index 32d8811..d45438f 100644
--- a/examples/calculator/main.cpp
+++ b/examples/calculator/main.cpp
@@ -50,7 +50,7 @@
#include <QApplication>
-#include <SingleApplication.h>
+#include <singleapplication.h>
#include "calculator.h"
diff --git a/examples/sending_arguments/main.cpp b/examples/sending_arguments/main.cpp
index 8368036..d90b250 100755
--- a/examples/sending_arguments/main.cpp
+++ b/examples/sending_arguments/main.cpp
@@ -1,4 +1,4 @@
-#include <SingleApplication.h>
+#include <singleapplication.h>
#include "messagereceiver.h"
int main(int argc, char *argv[])