Repeater example: show how to shut down cleanly

Since we connected to the client through the repeater, chances are
that we want this server shut down once the client disconnected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
pull/1/head
Johannes Schindelin 10 years ago
parent c0e012e4d2
commit 71d0f9b06f

@ -2,6 +2,11 @@
#include <rfb/rfb.h>
static void clientGone(rfbClientPtr cl)
{
rfbShutdownServer(cl->screen, TRUE);
}
int main(int argc,char** argv)
{
char *repeaterHost;
@ -53,6 +58,7 @@ int main(int argc,char** argv)
return 1;
}
cl->reverseConnection = 0;
cl->clientGoneHook = clientGone;
/* Run the server */
rfbInitServer(server);

Loading…
Cancel
Save