summaryrefslogtreecommitdiffstats
path: root/rfbserver.c
diff options
context:
space:
mode:
authordscho <dscho>2002-01-16 19:45:21 +0000
committerdscho <dscho>2002-01-16 19:45:21 +0000
commit9fb7fef3c6ff17651255e78a96ae20d96c0d46b4 (patch)
tree12298025ad0e5c56d15361a55d7a57a1120a9fa0 /rfbserver.c
parent94570b019a8e88df41deeee4acbfbc545a12829a (diff)
downloadlibtdevnc-9fb7fef3c6ff17651255e78a96ae20d96c0d46b4.tar.gz
libtdevnc-9fb7fef3c6ff17651255e78a96ae20d96c0d46b4.zip
clean ups and encoding "backchannel"
Diffstat (limited to 'rfbserver.c')
-rw-r--r--rfbserver.c26
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