Data Structures | Files | Defines | Typedefs | Functions | Variables

LibVNCClient API Reference

Data Structures

struct  rfbVNCRec
 vncrec More...
struct  rfbClientData
 client data More...
struct  AppData
 app data (belongs into rfbClient?) More...
union  rfbCredential
 For GetCredentialProc callback function to return. More...
struct  rfbClient
struct  rfbClientProtocolExtension

Files

file  rfbclient.h

Defines

#define rfbClientSwap16IfLE(s)   (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
#define rfbClientSwap32IfLE(l)
#define rfbClientSwap64IfLE(l)
#define FLASH_PORT_OFFSET   5400
#define LISTEN_PORT_OFFSET   5500
#define TUNNEL_PORT_OFFSET   5500
#define SERVER_PORT_OFFSET   5900
#define DEFAULT_SSH_CMD   "/usr/bin/ssh"
#define DEFAULT_TUNNEL_CMD   (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20")
#define DEFAULT_VIA_CMD   (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")
#define rfbCredentialTypeX509   1
#define rfbCredentialTypeUser   2

Typedefs

typedef void(* HandleTextChatProc )(struct _rfbClient *client, int value, char *text)
 Handles a text chat message.
typedef void(* HandleXvpMsgProc )(struct _rfbClient *client, uint8_t version, uint8_t opcode)
 Handles XVP server messages.
typedef void(* HandleKeyboardLedStateProc )(struct _rfbClient *client, int value, int pad)
typedef rfbBool(* HandleCursorPosProc )(struct _rfbClient *client, int x, int y)
typedef void(* SoftCursorLockAreaProc )(struct _rfbClient *client, int x, int y, int w, int h)
typedef void(* SoftCursorUnlockScreenProc )(struct _rfbClient *client)
typedef void(* GotFrameBufferUpdateProc )(struct _rfbClient *client, int x, int y, int w, int h)
typedef void(* FinishedFrameBufferUpdateProc )(struct _rfbClient *client)
typedef char *(* GetPasswordProc )(struct _rfbClient *client)
typedef rfbCredential *(* GetCredentialProc )(struct _rfbClient *client, int credentialType)
typedef rfbBool(* MallocFrameBufferProc )(struct _rfbClient *client)
typedef void(* GotXCutTextProc )(struct _rfbClient *client, const char *text, int textlen)
typedef void(* BellProc )(struct _rfbClient *client)
typedef void(* GotCursorShapeProc )(struct _rfbClient *client, int xhot, int yhot, int width, int height, int bytesPerPixel)
typedef void(* GotCopyRectProc )(struct _rfbClient *client, int src_x, int src_y, int w, int h, int dest_x, int dest_y)
typedef void(* rfbClientLogProc )(const char *format,...)

Functions

rfbBool HandleCursorShape (rfbClient *client, int xhot, int yhot, int width, int height, uint32_t enc)
void listenForIncomingConnections (rfbClient *viewer)
int listenForIncomingConnectionsNoFork (rfbClient *viewer, int usec_timeout)
rfbBool ConnectToRFBServer (rfbClient *client, const char *hostname, int port)
rfbBool ConnectToRFBRepeater (rfbClient *client, const char *repeaterHost, int repeaterPort, const char *destHost, int destPort)
void SetClientAuthSchemes (rfbClient *client, const uint32_t *authSchemes, int size)
rfbBool InitialiseRFBConnection (rfbClient *client)
rfbBool SetFormatAndEncodings (rfbClient *client)
 Sends format and encoding parameters to the server.
rfbBool SendIncrementalFramebufferUpdateRequest (rfbClient *client)
rfbBool SendFramebufferUpdateRequest (rfbClient *client, int x, int y, int w, int h, rfbBool incremental)
 Sends a framebuffer update request to the server.
rfbBool SendScaleSetting (rfbClient *client, int scaleSetting)
rfbBool SendPointerEvent (rfbClient *client, int x, int y, int buttonMask)
 Sends a pointer event to the server.
rfbBool SendKeyEvent (rfbClient *client, uint32_t key, rfbBool down)
 Sends a key event to the server.
rfbBool SendClientCutText (rfbClient *client, char *str, int len)
 Places a string on the server's clipboard.
rfbBool HandleRFBServerMessage (rfbClient *client)
 Handles messages from the RFB server.
rfbBool TextChatSend (rfbClient *client, char *text)
 Sends a text chat message to the server.
rfbBool TextChatOpen (rfbClient *client)
 Opens a text chat window on the server.
rfbBool TextChatClose (rfbClient *client)
 Closes the text chat window on the server.
rfbBool TextChatFinish (rfbClient *client)
rfbBool PermitServerInput (rfbClient *client, int enabled)
rfbBool SendXvpMsg (rfbClient *client, uint8_t version, uint8_t code)
void PrintPixelFormat (rfbPixelFormat *format)
rfbBool SupportsClient2Server (rfbClient *client, int messageType)
rfbBool SupportsServer2Client (rfbClient *client, int messageType)
void rfbClientSetClientData (rfbClient *client, void *tag, void *data)
 Associates a client data tag with the given pointer.
void * rfbClientGetClientData (rfbClient *client, void *tag)
 Returns a pointer to the client data associated with the given tag.
void rfbClientRegisterExtension (rfbClientProtocolExtension *e)
rfbBool ReadFromRFBServer (rfbClient *client, char *out, unsigned int n)
rfbBool WriteToRFBServer (rfbClient *client, char *buf, int n)
int FindFreeTcpPort (void)
int ListenAtTcpPort (int port)
int ListenAtTcpPortAndAddress (int port, const char *address)
int ConnectClientToTcpAddr (unsigned int host, int port)
int ConnectClientToTcpAddr6 (const char *hostname, int port)
int ConnectClientToUnixSock (const char *sockFile)
int AcceptTcpConnection (int listenSock)
rfbBool SetNonBlocking (int sock)
rfbBool SetDSCP (int sock, int dscp)
rfbBool StringToIPAddr (const char *str, unsigned int *addr)
rfbBool SameMachine (int sock)
int WaitForMessage (rfbClient *client, unsigned int usecs)
 Waits for an RFB message to arrive from the server.
rfbClientrfbGetClient (int bitsPerSample, int samplesPerPixel, int bytesPerPixel)
 Allocates and returns a pointer to an rfbClient structure.
rfbBool rfbInitClient (rfbClient *client, int *argc, char **argv)
 Initializes the client.
void rfbClientCleanup (rfbClient *client)
 Cleans up the client structure and releases the memory allocated for it.

Variables

rfbBool rfbEnableClientLogging
rfbClientLogProc rfbClientLog
rfbClientLogProc rfbClientErr
rfbBool errorMessageOnReadFailure

Define Documentation

#define DEFAULT_SSH_CMD   "/usr/bin/ssh"

Definition at line 66 of file rfbclient.h.

#define DEFAULT_TUNNEL_CMD   (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20")

Definition at line 67 of file rfbclient.h.

#define DEFAULT_VIA_CMD   (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")

Definition at line 69 of file rfbclient.h.

#define FLASH_PORT_OFFSET   5400

Definition at line 61 of file rfbclient.h.

#define LISTEN_PORT_OFFSET   5500

Definition at line 62 of file rfbclient.h.

#define rfbClientSwap16IfLE (   s  )     (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))

Definition at line 42 of file rfbclient.h.

#define rfbClientSwap32IfLE (   l  ) 
Value:
(*(char *)&client->endianTest ? ((((l) & 0xff000000) >> 24) | \
                             (((l) & 0x00ff0000) >> 8)  | \
                             (((l) & 0x0000ff00) << 8)  | \
                             (((l) & 0x000000ff) << 24))  : (l))

Definition at line 45 of file rfbclient.h.

#define rfbClientSwap64IfLE (   l  ) 
Value:
(*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \
                             (((l) & 0x00ff000000000000ULL) >> 40)  | \
                             (((l) & 0x0000ff0000000000ULL) >> 24)  | \
                             (((l) & 0x000000ff00000000ULL) >> 8)  | \
                             (((l) & 0x00000000ff000000ULL) << 8)  | \
                             (((l) & 0x0000000000ff0000ULL) << 24)  | \
                             (((l) & 0x000000000000ff00ULL) << 40)  | \
                             (((l) & 0x00000000000000ffULL) << 56))  : (l))

Definition at line 51 of file rfbclient.h.

#define rfbCredentialTypeUser   2

Definition at line 136 of file rfbclient.h.

#define rfbCredentialTypeX509   1

Definition at line 135 of file rfbclient.h.

#define SERVER_PORT_OFFSET   5900

Definition at line 64 of file rfbclient.h.

#define TUNNEL_PORT_OFFSET   5500

Definition at line 63 of file rfbclient.h.


Typedef Documentation

typedef void(* BellProc)(struct _rfbClient *client)

Definition at line 171 of file rfbclient.h.

typedef void(* FinishedFrameBufferUpdateProc)(struct _rfbClient *client)

Definition at line 166 of file rfbclient.h.

typedef rfbCredential*(* GetCredentialProc)(struct _rfbClient *client, int credentialType)

Definition at line 168 of file rfbclient.h.

typedef char*(* GetPasswordProc)(struct _rfbClient *client)

Definition at line 167 of file rfbclient.h.

typedef void(* GotCopyRectProc)(struct _rfbClient *client, int src_x, int src_y, int w, int h, int dest_x, int dest_y)

Definition at line 174 of file rfbclient.h.

typedef void(* GotCursorShapeProc)(struct _rfbClient *client, int xhot, int yhot, int width, int height, int bytesPerPixel)

Definition at line 173 of file rfbclient.h.

typedef void(* GotFrameBufferUpdateProc)(struct _rfbClient *client, int x, int y, int w, int h)

Definition at line 165 of file rfbclient.h.

typedef void(* GotXCutTextProc)(struct _rfbClient *client, const char *text, int textlen)

Definition at line 170 of file rfbclient.h.

typedef rfbBool(* HandleCursorPosProc)(struct _rfbClient *client, int x, int y)

Definition at line 162 of file rfbclient.h.

typedef void(* HandleKeyboardLedStateProc)(struct _rfbClient *client, int value, int pad)

Definition at line 161 of file rfbclient.h.

typedef void(* HandleTextChatProc)(struct _rfbClient *client, int value, char *text)

Handles a text chat message.

If your application should accept text messages from the server, define a function with this prototype and set client->HandleTextChat to a pointer to that function subsequent to your rfbGetClient() call.

Parameters:
client The client which called the text chat handler
value text length if text != NULL, or one of rfbTextChatOpen, rfbTextChatClose, rfbTextChatFinished if text == NULL
text The text message from the server

Definition at line 150 of file rfbclient.h.

typedef void(* HandleXvpMsgProc)(struct _rfbClient *client, uint8_t version, uint8_t opcode)

Handles XVP server messages.

If your application sends XVP messages to the server, you'll want to handle the server's XVP_FAIL and XVP_INIT responses. Define a function with this prototype and set client->HandleXvpMsg to a pointer to that function subsequent to your rfbGetClient() call.

Parameters:
client The client which called the XVP message handler
version The highest XVP extension version that the server supports
opcode The opcode. 0 is XVP_FAIL, 1 is XVP_INIT

Definition at line 160 of file rfbclient.h.

typedef rfbBool(* MallocFrameBufferProc)(struct _rfbClient *client)

Definition at line 169 of file rfbclient.h.

typedef void(* rfbClientLogProc)(const char *format,...)

Definition at line 363 of file rfbclient.h.

typedef void(* SoftCursorLockAreaProc)(struct _rfbClient *client, int x, int y, int w, int h)

Definition at line 163 of file rfbclient.h.

typedef void(* SoftCursorUnlockScreenProc)(struct _rfbClient *client)

Definition at line 164 of file rfbclient.h.


Function Documentation

int AcceptTcpConnection ( int  listenSock  ) 

Definition at line 598 of file sockets.c.

Here is the caller graph for this function:

int ConnectClientToTcpAddr ( unsigned int  host,
int  port 
)

Definition at line 302 of file sockets.c.

Here is the caller graph for this function:

int ConnectClientToTcpAddr6 ( const char *  hostname,
int  port 
)

Definition at line 341 of file sockets.c.

Here is the caller graph for this function:

int ConnectClientToUnixSock ( const char *  sockFile  ) 

Definition at line 403 of file sockets.c.

Here is the caller graph for this function:

rfbBool ConnectToRFBRepeater ( rfbClient client,
const char *  repeaterHost,
int  repeaterPort,
const char *  destHost,
int  destPort 
)

Definition at line 438 of file rfbproto.c.

Here is the call graph for this function:

rfbBool ConnectToRFBServer ( rfbClient client,
const char *  hostname,
int  port 
)

Definition at line 371 of file rfbproto.c.

Here is the call graph for this function:

int FindFreeTcpPort ( void   ) 

Definition at line 438 of file sockets.c.

rfbBool HandleCursorShape ( rfbClient client,
int  xhot,
int  yhot,
int  width,
int  height,
uint32_t  enc 
)

Definition at line 46 of file cursor.c.

Here is the call graph for this function:

Here is the caller graph for this function:

rfbBool HandleRFBServerMessage ( rfbClient client  ) 

Handles messages from the RFB server.

You must call this function intermittently so LibVNCClient can parse messages from the server. For example, if your app has a draw loop, you could place a call to this function within that draw loop.

Note:
You must call WaitForMessage() before you call this function.
Parameters:
client The client which will handle the RFB server messages
Returns:
true if the client was able to handle the RFB server messages, false otherwise
Examples:
ppmtest.c, SDLvncviewer.c, and vnc2mpg.c.

Definition at line 1709 of file rfbproto.c.

Here is the call graph for this function:

Here is the caller graph for this function:

rfbBool InitialiseRFBConnection ( rfbClient client  ) 

Definition at line 1038 of file rfbproto.c.

Here is the call graph for this function:

int ListenAtTcpPort ( int  port  ) 

Definition at line 473 of file sockets.c.

Here is the call graph for this function:

int ListenAtTcpPortAndAddress ( int  port,
const char *  address 
)

Definition at line 486 of file sockets.c.

Here is the caller graph for this function:

void listenForIncomingConnections ( rfbClient viewer  ) 

Definition at line 47 of file listen.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int listenForIncomingConnectionsNoFork ( rfbClient viewer,
int  usec_timeout 
)

Definition at line 148 of file listen.c.

Here is the call graph for this function:

Here is the caller graph for this function:

rfbBool PermitServerInput ( rfbClient client,
int  enabled 
)

Definition at line 1601 of file rfbproto.c.

Here is the call graph for this function:

static void PrintPixelFormat ( rfbPixelFormat format  ) 

Definition at line 460 of file translate.c.

Here is the caller graph for this function:

rfbBool ReadFromRFBServer ( rfbClient client,
char *  out,
unsigned int  n 
)

Definition at line 74 of file sockets.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void rfbClientCleanup ( rfbClient client  ) 

Cleans up the client structure and releases the memory allocated for it.

You should call this when you're done with the rfbClient structure that you allocated with rfbGetClient().

Note:
rfbClientCleanup() does not touch client->frameBuffer.
Parameters:
client The client to clean up
Examples:
ppmtest.c, and SDLvncviewer.c.

Definition at line 342 of file vncviewer.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void* rfbClientGetClientData ( rfbClient client,
void *  tag 
)

Returns a pointer to the client data associated with the given tag.

See the the documentation for rfbClientSetClientData() for a discussion of how you can use client data.

Parameters:
client The client from which to get the client data
tag The tag which identifies the client data
Returns:
a pointer to the client data
Examples:
SDLvncviewer.c.

Definition at line 124 of file rfbproto.c.

void rfbClientRegisterExtension ( rfbClientProtocolExtension e  ) 

Definition at line 100 of file rfbproto.c.

void rfbClientSetClientData ( rfbClient client,
void *  tag,
void *  data 
)

Associates a client data tag with the given pointer.

LibVNCClient has several events to which you can associate your own handlers. These handlers have the client structure as one of their parameters. Sometimes, you may want to make data from elsewhere in your application available to these handlers without using a global variable. To do this, you call rfbClientSetClientData() and associate the data with a tag. Then, your handler can call rfbClientGetClientData() and get the a pointer to the data associated with that tag.

Parameters:
client The client in which to set the client data
tag A unique tag which identifies the data
data A pointer to the data to associate with the tag
Examples:
SDLvncviewer.c.

Definition at line 108 of file rfbproto.c.

rfbClient* rfbGetClient ( int  bitsPerSample,
int  samplesPerPixel,
int  bytesPerPixel 
)

Allocates and returns a pointer to an rfbClient structure.

This will probably be the first LibVNCClient function your client code calls. Most libVNCClient functions operate on an rfbClient structure, and this function allocates memory for that structure. When you're done with the rfbClient structure pointer this function returns, you should free the memory rfbGetClient() allocated by calling rfbClientCleanup().

A pixel is one dot on the screen. The number of bytes in a pixel will depend on the number of samples in that pixel and the number of bits in each sample. A sample represents one of the primary colors in a color model. The RGB color model uses red, green, and blue samples respectively. Suppose you wanted to use 16-bit RGB color: You would have three samples per pixel (one for each primary color), five bits per sample (the quotient of 16 RGB bits divided by three samples), and two bytes per pixel (the smallest multiple of eight bits in which the 16-bit pixel will fit). If you wanted 32-bit RGB color, you would have three samples per pixel again, eight bits per sample (since that's how 32-bit color is defined), and four bytes per pixel (the smallest multiple of eight bits in which the 32-bit pixel will fit.

Parameters:
bitsPerSample The number of bits in a sample
samplesPerPixel The number of samples in a pixel
bytesPerPixel The number of bytes in a pixel
Returns:
a pointer to the allocated rfbClient structure
Examples:
ppmtest.c, SDLvncviewer.c, and vnc2mpg.c.

Definition at line 110 of file vncviewer.c.

Here is the caller graph for this function:

rfbBool rfbInitClient ( rfbClient client,
int *  argc,
char **  argv 
)

Initializes the client.

The format is {PROGRAM_NAME, [OPTIONS]..., HOST}. This function does not initialize the program name if the rfbClient's program name is set already. The options are as follows:

OptionDescription
-listenListen for incoming connections.
-listennoforkListen for incoming connections without forking.
-playSet this client to replay a previously recorded session.
-encodingsSet the encodings to use. The next item in the argv array is the encodings string, consisting of comma separated encodings like 'tight,ultra,raw'.
-compressSet the compression level. The next item in the argv array is the compression level as an integer. Ranges from 0 (lowest) to 9 (highest).
-scaleSet the scaling level. The next item in the argv array is the scaling level as an integer. The screen will be scaled down by this factor.
-qosdscpSet the Quality of Service Differentiated Services Code Point (QoS DSCP). The next item in the argv array is the code point as an integer.
-repeaterdestSet a VNC repeater address. The next item in the argv array is the repeater's address as a string.

The host may include a port number (delimited by a ':').

Parameters:
client The client to initialize
argc The number of arguments to the initializer
argv The arguments to the initializer as an array of NULL terminated strings
Returns:
true if the client was initialized successfully, false otherwise.
Examples:
ppmtest.c, SDLvncviewer.c, and vnc2mpg.c.

Definition at line 263 of file vncviewer.c.

Here is the call graph for this function:

Here is the caller graph for this function:

rfbBool SameMachine ( int  sock  ) 

Definition at line 731 of file sockets.c.

Here is the caller graph for this function:

rfbBool SendClientCutText ( rfbClient client,
char *  str,
int  len 
)

Places a string on the server's clipboard.

Use this function if you want to be able to copy and paste between the server and your application. For instance, when your application is notified that the user copied some text onto the clipboard, you would call this function to synchronize the server's clipboard with your local clipboard.

Parameters:
client The client structure through which to send the client cut text message
str The string to send (doesn't need to be NULL terminated)
len The length of the string
Returns:
true if the client cut message was sent successfully, false otherwise
Examples:
SDLvncviewer.c.

Definition at line 1690 of file rfbproto.c.

Here is the call graph for this function:

rfbBool SendFramebufferUpdateRequest ( rfbClient client,
int  x,
int  y,
int  w,
int  h,
rfbBool  incremental 
)

Sends a framebuffer update request to the server.

A VNC client may request an update from the server at any time. You can also specify which portions of the screen you want updated. This can be handy if a pointer is at certain location and the user pressed a mouse button, for instance. Then you can immediately request an update of the region around the pointer from the server.

Note:
The coordinate system is a left-handed Cartesian coordinate system with the Z axis (unused) pointing out of the screen. Alternately you can think of it as a right-handed Cartesian coordinate system with the Z axis pointing into the screen. The origin is at the upper left corner of the framebuffer.
Parameters:
client The client through which to send the request
x The horizontal position of the update request rectangle
y The vertical position of the update request rectangle
w The width of the update request rectangle
h The height of the update request rectangle
incremental false: server sends rectangle even if nothing changed. true: server only sends changed parts of rectangle.
Returns:
true if the update request was sent successfully, false otherwise
Examples:
SDLvncviewer.c.

Definition at line 1487 of file rfbproto.c.

Here is the call graph for this function:

Here is the caller graph for this function:

rfbBool SendIncrementalFramebufferUpdateRequest ( rfbClient client  ) 

Definition at line 1474 of file rfbproto.c.

Here is the call graph for this function:

Here is the caller graph for this function:

rfbBool SendKeyEvent ( rfbClient client,
uint32_t  key,
rfbBool  down 
)

Sends a key event to the server.

If your application is not merely a VNC viewer (i.e. it controls the server), you'll want to send the keys that the user presses to the server. Use this function to do that.

Parameters:
client The client through which to send the key event
key An rfbKeySym defined in rfb/keysym.h
down true if this was a key down event, false otherwise
Returns:
true if the key event was send successfully, false otherwise
Examples:
SDLvncviewer.c.

Definition at line 1672 of file rfbproto.c.

Here is the call graph for this function:

rfbBool SendPointerEvent ( rfbClient client,
int  x,
int  y,
int  buttonMask 
)

Sends a pointer event to the server.

A pointer event includes a cursor location and a button mask. The button mask indicates which buttons on the pointing device are pressed. Each button is represented by a bit in the button mask. A 1 indicates the button is pressed while a 0 indicates that it is not pressed. You may use these pre-defined button masks by ORing them together: rfbButton1Mask, rfbButton2Mask, rfbButton3Mask, rfbButton4Mask rfbButton5Mask

Note:
The cursor location is relative to the client's framebuffer, not the client's screen itself.
The coordinate system is a left-handed Cartesian coordinate system with the Z axis (unused) pointing out of the screen. Alternately you can think of it as a right-handed Cartesian coordinate system with the Z axis pointing into the screen. The origin is at the upper left corner of the screen.
Parameters:
client The client through which to send the pointer event
x the horizontal location of the cursor
y the vertical location of the cursor
buttonMask the button mask indicating which buttons are pressed
Returns:
true if the pointer event was sent successfully, false otherwise
Examples:
SDLvncviewer.c.

Definition at line 1650 of file rfbproto.c.

Here is the call graph for this function:

rfbBool SendScaleSetting ( rfbClient client,
int  scaleSetting 
)

Definition at line 1511 of file rfbproto.c.

Here is the call graph for this function:

rfbBool SendXvpMsg ( rfbClient client,
uint8_t  version,
uint8_t  code 
)

Definition at line 1628 of file rfbproto.c.

Here is the call graph for this function:

void SetClientAuthSchemes ( rfbClient client,
const uint32_t *  authSchemes,
int  size 
)

Definition at line 1009 of file rfbproto.c.

rfbBool SetDSCP ( int  sock,
int  dscp 
)

Definition at line 650 of file sockets.c.

Here is the caller graph for this function:

rfbBool SetFormatAndEncodings ( rfbClient client  ) 

Sends format and encoding parameters to the server.

Your application can modify the 'client' data structure directly. However some changes to this structure must be communicated back to the server. For instance, if you change the encoding to hextile, the server needs to know that it should send framebuffer updates in hextile format. Likewise if you change the pixel format of the framebuffer, the server must be notified about this as well. Call this function to propagate your changes of the local 'client' structure over to the server.

  • Encoding type
  • RFB protocol extensions announced via pseudo-encodings
  • Framebuffer pixel format (like RGB vs ARGB)
  • Remote cursor support
    Parameters:
    client The client in which the format or encodings have been changed
    Returns:
    true if the format or encodings were sent to the server successfully, false otherwise
Examples:
SDLvncviewer.c.

Definition at line 1263 of file rfbproto.c.

Here is the call graph for this function:

rfbBool SetNonBlocking ( int  sock  ) 

Definition at line 627 of file sockets.c.

Here is the caller graph for this function:

rfbBool StringToIPAddr ( const char *  str,
unsigned int *  addr 
)

Definition at line 698 of file sockets.c.

Here is the caller graph for this function:

rfbBool SupportsClient2Server ( rfbClient client,
int  messageType 
)

Definition at line 266 of file rfbproto.c.

Here is the caller graph for this function:

rfbBool SupportsServer2Client ( rfbClient client,
int  messageType 
)

Definition at line 272 of file rfbproto.c.

rfbBool TextChatClose ( rfbClient client  ) 

Closes the text chat window on the server.

Parameters:
client The client through which to send the message
Returns:
true if the window was closed successfully, false otherwise

Definition at line 1574 of file rfbproto.c.

Here is the call graph for this function:

rfbBool TextChatFinish ( rfbClient client  ) 

Definition at line 1585 of file rfbproto.c.

Here is the call graph for this function:

rfbBool TextChatOpen ( rfbClient client  ) 

Opens a text chat window on the server.

Parameters:
client The client through which to send the message
Returns:
true if the window was opened successfully, false otherwise
Examples:
SDLvncviewer.c.

Definition at line 1562 of file rfbproto.c.

Here is the call graph for this function:

rfbBool TextChatSend ( rfbClient client,
char *  text 
)

Sends a text chat message to the server.

Parameters:
client The client through which to send the message
text The text to send
Returns:
true if the text was sent successfully, false otherwise

Definition at line 1540 of file rfbproto.c.

Here is the call graph for this function:

int WaitForMessage ( rfbClient client,
unsigned int  usecs 
)

Waits for an RFB message to arrive from the server.

Before handling a message with HandleRFBServerMessage(), you must wait for your client to receive one. This function blocks until a message is received. You may specify a timeout in microseconds. Once this number of microseconds have elapsed, the function will return.

Parameters:
client The client to cause to wait until a message is received
usecs The timeout in microseconds
Returns:
the return value of the underlying select() call
Examples:
ppmtest.c, SDLvncviewer.c, and vnc2mpg.c.

Definition at line 786 of file sockets.c.

Here is the caller graph for this function:

rfbBool WriteToRFBServer ( rfbClient client,
char *  buf,
int  n 
)

Definition at line 228 of file sockets.c.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 57 of file sockets.c.

Examples:
ppmtest.c, and SDLvncviewer.c.

Definition at line 94 of file rfbproto.c.

Examples:
ppmtest.c, and SDLvncviewer.c.

Definition at line 93 of file rfbproto.c.

Examples:
SDLvncviewer.c.

Definition at line 69 of file rfbproto.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines