diff options
Diffstat (limited to 'rfbserver.c')
-rw-r--r-- | rfbserver.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/rfbserver.c b/rfbserver.c index 34ac38e..94533f3 100644 --- a/rfbserver.c +++ b/rfbserver.c @@ -1460,3 +1460,29 @@ rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen) rfbDisconnectUDPSock(rfbScreen); } } + +#ifdef BACKCHANNEL +void rfbSendBackChannel(rfbScreenInfoPtr rfbScreen,char* str,int len) +{ + rfbClientPtr cl; + rfbBackChannelMsg sct; + rfbClientIteratorPtr iterator; + + iterator = rfbGetClientIterator(rfbScreen); + while ((cl = rfbClientIteratorNext(iterator)) != NULL) { + sct.type = rfbBackChannel; + sct.length = Swap32IfLE(len); + if (WriteExact(cl, (char *)&sct, + sz_rfbServerCutTextMsg) < 0) { + rfbLogPerror("rfbSendServerCutText: write"); + rfbCloseClient(cl); + continue; + } + if (WriteExact(cl, str, len) < 0) { + rfbLogPerror("rfbSendServerCutText: write"); + rfbCloseClient(cl); + } + } + rfbReleaseClientIterator(iterator); +} +#endif |