Commit 71d0f9b0 authored by Johannes Schindelin's avatar Johannes Schindelin

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: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent c0e012e4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment