Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

vrpn_Connection.h File Reference


Compounds

struct  vrpn_HANDLERPARAM
struct  vrpn_LOGLIST
struct  vrpnMsgCallbackEntry
struct  vrpnLogFilterEntry
class  vrpn_Endpoint
class  vrpn_Connection

Typedefs

typedef int (* vrpn_MESSAGEHANDLER )(void *userdata, vrpn_HANDLERPARAM p)
Type of a message handler for vrpn_Connection messages.

typedef vrpn_MESSAGEHANDLER vrpn_LOGFILTER
Type of handler for filters on logfiles is the same as connection handler.

typedef char cName [100]
Length of names within VRPN.


Functions

vrpn_Connectionvrpn_get_connection_by_name ( const char * cname, const char * local_in_logfile_name = NULL, const char * local_out_logfile_name = NULL, const char * remote_in_logfile_name = NULL, const char * remote_out_logfile_name = NULL, double dFreq = 1.0, int cSyncWindow = 3, const char * NIC_IPaddress = NULL)
char* vrpn_copy_service_name (const char * fullname)
char* vrpn_copy_service_location (const char * fullname)
char* vrpn_copy_file_name (const char * filespecifier)
char* vrpn_copy_machine_name (const char * hostspecifier)
int vrpn_get_port_number (const char * hostspecifier)
char* vrpn_copy_rsh_program (const char * hostspecifier)
char* vrpn_copy_rsh_arguments (const char * hostspecifier)
int check_vrpn_cookie (const char * buffer)
Checks to see if the given buffer has the magic cookie. More...

int check_vrpn_file_cookie (const char * buffer)
int vrpn_cookie_size (void)
int write_vrpn_cookie (char * buffer, int length, long remote_log_mode)
Writes the magic cookie into buffer with given length. More...

int vrpn_noint_block_write (int outfile, const char buffer[], int length)
This routine will write a block to a file descriptor. More...

int vrpn_noint_block_read (int infile, char buffer[], int length)
This routine will read in a block from the file descriptor. More...


Variables

const unsigned vrpn_ALIGN
VRPN buffers are aligned on 8 byte boundaries.

const int vrpn_CONNECTION_MAX_SENDERS
const int vrpn_CONNECTION_MAX_TYPES
const int vrpn_ANY_SENDER
const int vrpn_ANY_TYPE
const int vrpn_CONNECTION_TCP_BUFLEN
const int vrpn_CONNECTION_UDP_BUFLEN
const int vrpn_MAX_ENDPOINTS
Number of endpoints that a server connection can have. Arbitrary limit.

const vrpn_int32 vrpn_CONNECTION_SENDER_DESCRIPTION
const vrpn_int32 vrpn_CONNECTION_TYPE_DESCRIPTION
const vrpn_int32 vrpn_CONNECTION_UDP_DESCRIPTION
const vrpn_int32 vrpn_CONNECTION_LOG_DESCRIPTION
const vrpn_int32 vrpn_CONNECTION_DISCONNECT_MESSAGE
const vrpn_uint32 vrpn_CONNECTION_RELIABLE
const vrpn_uint32 vrpn_CONNECTION_FIXED_LATENCY
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY
const vrpn_uint32 vrpn_CONNECTION_FIXED_THROUGHPUT
const vrpn_uint32 vrpn_CONNECTION_HIGH_THROUGHPUT
const long vrpn_LOG_NONE
const long vrpn_LOG_INCOMING
const long vrpn_LOG_OUTGOING
const unsigned short vrpn_DEFAULT_LISTEN_PORT_NO
const char* vrpn_got_first_connection
const char* vrpn_got_connection
const char* vrpn_dropped_connection
const char* vrpn_dropped_last_connection
const char* vrpn_CONTROL


Typedef Documentation

typedef int (* vrpn_MESSAGEHANDLER)(void *userdata, vrpn_HANDLERPARAM p)

Type of a message handler for vrpn_Connection messages.

typedef vrpn_MESSAGEHANDLER vrpn_LOGFILTER

Type of handler for filters on logfiles is the same as connection handler.

typedef char cName[100]

Length of names within VRPN.


Function Documentation

vrpn_Connection * vrpn_get_connection_by_name (const char * cname, const char * local_in_logfile_name = NULL, const char * local_out_logfile_name = NULL, const char * remote_in_logfile_name = NULL, const char * remote_out_logfile_name = NULL, double dFreq = 1.0, int cSyncWindow = 3, const char * NIC_IPaddress = NULL)

char * vrpn_copy_service_name (const char * fullname)

char * vrpn_copy_service_location (const char * fullname)

char * vrpn_copy_file_name (const char * filespecifier)

char * vrpn_copy_machine_name (const char * hostspecifier)

int vrpn_get_port_number (const char * hostspecifier)

char * vrpn_copy_rsh_program (const char * hostspecifier)

char * vrpn_copy_rsh_arguments (const char * hostspecifier)

int check_vrpn_cookie (const char * buffer)

Checks to see if the given buffer has the magic cookie.

Returns -1 on a mismatch, 0 on an exact match, 1 on a minor version difference.

int check_vrpn_file_cookie (const char * buffer)

int vrpn_cookie_size (void)

int write_vrpn_cookie (char * buffer, int length, long remote_log_mode)

Writes the magic cookie into buffer with given length.

On failure (if the buffer is too short), returns -1; otherwise returns 0.

This is exposed in vrpn_Connection.h so that we can write add_vrpn_cookie.

int vrpn_noint_block_write (int outfile, const char buffer[], int length)

This routine will write a block to a file descriptor.

It acts just like the write() system call does on files, but it will keep sending to a socket until an error or all of the data has gone. This will also take care of problems caused by interrupted system calls, retrying the write when they occur. It will also work when sending large blocks of data through socket connections, since it will send all of the data before returning. This routine will either write the requested number of bytes and return that or return -1 (in the case of an error) or 0 (in the case of EOF being reached before all the data is sent).

int vrpn_noint_block_read (int infile, char buffer[], int length)

This routine will read in a block from the file descriptor.

It acts just like the read() routine does on normal files, so that it hides the fact that the descriptor may point to a socket. This will also take care of problems caused by interrupted system calls, retrying the read when they occur. This routine will either read the requested number of bytes and return that or return -1 (in the case of an error) or 0 (in the case of EOF being reached before all the data arrives).


Variable Documentation

const unsigned vrpn_ALIGN

VRPN buffers are aligned on 8 byte boundaries.

const int vrpn_CONNECTION_MAX_SENDERS

const int vrpn_CONNECTION_MAX_TYPES

const int vrpn_ANY_SENDER

const int vrpn_ANY_TYPE

const int vrpn_CONNECTION_TCP_BUFLEN

const int vrpn_CONNECTION_UDP_BUFLEN

const int vrpn_MAX_ENDPOINTS

Number of endpoints that a server connection can have. Arbitrary limit.

const vrpn_int32 vrpn_CONNECTION_SENDER_DESCRIPTION

const vrpn_int32 vrpn_CONNECTION_TYPE_DESCRIPTION

const vrpn_int32 vrpn_CONNECTION_UDP_DESCRIPTION

const vrpn_int32 vrpn_CONNECTION_LOG_DESCRIPTION

const vrpn_int32 vrpn_CONNECTION_DISCONNECT_MESSAGE

const vrpn_uint32 vrpn_CONNECTION_RELIABLE

const vrpn_uint32 vrpn_CONNECTION_FIXED_LATENCY

const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY

const vrpn_uint32 vrpn_CONNECTION_FIXED_THROUGHPUT

const vrpn_uint32 vrpn_CONNECTION_HIGH_THROUGHPUT

const long vrpn_LOG_NONE

const long vrpn_LOG_INCOMING

const long vrpn_LOG_OUTGOING

const unsigned short vrpn_DEFAULT_LISTEN_PORT_NO

const char* vrpn_got_first_connection

const char* vrpn_got_connection

const char* vrpn_dropped_connection

const char* vrpn_dropped_last_connection

const char* vrpn_CONTROL


Generated at Fri Sep 13 15:03:40 2002 for vrpn by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999