summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authordscho <dscho>2004-10-16 02:46:52 +0000
committerdscho <dscho>2004-10-16 02:46:52 +0000
commitb583cf5347fbd3f1d45e068a970e9cc207337e78 (patch)
treec4f0e9dd5fab0adaa233442fd51b33b545959a01 /rfb
parent8715a8ab4243f667e38ad315d98fc38588946362 (diff)
downloadlibtdevnc-b583cf5347fbd3f1d45e068a970e9cc207337e78.tar.gz
libtdevnc-b583cf5347fbd3f1d45e068a970e9cc207337e78.zip
move read buffer to rfbClient structure (thread safety); make rfbClientLog
overrideable
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfbclient.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 6983c31..b094ce2 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -102,7 +102,7 @@ typedef struct _rfbClient {
AppData appData;
const char* programName;
- const char* serverHost;
+ char* serverHost;
int serverPort; /* if -1, then use file recorded by vncrec */
rfbBool listenSpecified;
int listenPort, flashPort;
@@ -112,8 +112,8 @@ typedef struct _rfbClient {
Hextile also assumes it is big enough to hold 16 * 16 * 32 bits.
Tight encoding assumes BUFFER_SIZE is at least 16384 bytes. */
-#define BUFFER_SIZE (640*480)
- char buffer[BUFFER_SIZE];
+#define RFB_BUFFER_SIZE (640*480)
+ char buffer[RFB_BUFFER_SIZE];
/* rfbproto.c */
@@ -126,6 +126,13 @@ typedef struct _rfbClient {
char *serverCutText;
rfbBool newServerCutText;
+ /* sockets.c */
+#define RFB_BUF_SIZE 8192
+ char buf[RFB_BUF_SIZE];
+ char *bufoutptr;
+ int buffered;
+
+
/* cursor.c */
uint8_t *rcSource, *rcMask;
@@ -156,7 +163,8 @@ extern void listenForIncomingConnections(rfbClient* viewer);
/* rfbproto.c */
extern rfbBool rfbEnableClientLogging;
-extern void rfbClientLog(const char *format, ...);
+typedef void (*rfbClientLogProc)(const char *format, ...);
+extern rfbClientLogProc rfbClientLog,rfbClientErr;
extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
extern rfbBool InitialiseRFBConnection(rfbClient* client);
extern rfbBool SetFormatAndEncodings(rfbClient* client);