summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2009-10-26 22:24:21 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2009-10-30 18:29:05 +0100
commit0a4f1bada4f6e62e1cb4ffd6c34e6c8313c39aef (patch)
treed881e3baa675fa505fc449b955358d72dfee2d71 /rfb
parent3b608cd39b0f335658dc56525d1d099722d27333 (diff)
downloadlibvncserver-0a4f1bada4f6e62e1cb4ffd6c34e6c8313c39aef.zip
libvncserver-0a4f1bada4f6e62e1cb4ffd6c34e6c8313c39aef.tar.gz
libvncclient: add a non-forking listen function.
Forking the whole process from deep within a library call does not really work at all with apps that use multiple threads, i.e. every reasonably modern GUI app. So, provide a non-forking listen function so that the caller can decide if to fork, start a thread, etc. This implementation adds a timeout parameter to be able to call the listen function multiple times so that it's possible to do sth. else in between, e.g. abort listening. Signed-off-by: Christian Beier <dontmind@freeshell.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfbclient.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 40c1775..aa9d2e4 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -151,6 +151,9 @@ typedef struct _rfbClient {
rfbPixelFormat format;
rfbServerInitMsg si;
+ /* listen.c */
+ int listenSock;
+
/* sockets.c */
#define RFB_BUF_SIZE 8192
char buf[RFB_BUF_SIZE];
@@ -260,6 +263,7 @@ extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width
/* listen.c */
extern void listenForIncomingConnections(rfbClient* viewer);
+extern rfbBool listenForIncomingConnectionsNoFork(rfbClient* viewer, int usec_timeout);
/* rfbproto.c */
OpenPOWER on IntegriCloud