Help on using conn.c and the communication provided. The following functions are included in conn.c int setportconn ( int s, int port, int range) This function creates the socket and binds to a port. s is the socket that setportconn creates, port is the initial port that you want to work with, and range is the number of ports you want to check for an open port. For example, if port is 2000 and range is 10, setportconn will give you the first available port between 2000 and 2010. If no ports are available or there is an error, setportconn returns an error code. int allowconn ( int s, int fe, int *spid ) This function listens on the socket s is the socket that was created in setportconn, fe is if forking is enabled, 0 is no and 1 is yes, if forking is enabled spid will contain the new pid of the process that was forked off. The return value comes from the accept connection. int probeconn ( int s, int fe, int *spid ) This is a non-blocking form of allowconn int getconn ( char *host, int *port, int search ) This attempts to connect to another host, by creating a socket and connecting. host is the fullname of the host running a service, port is the inital port to check and search is the range of ports that getconn should check. The return value is the socket that was created or an error code on failure. int getconn_addr( unsigned long addr, int *port, int search ) This is the same of getconn but uses the sa_addr of the host running the service. int closeconn(int s) Closes the socket int pollconn( int s ) Checks for incoming events on a socket int writeconn( int s, char *data, int len) This sends stream data to socket s, data is the raw data to send, and len is the length of the data to send. Returns the amount of data actually written. int readconn( int s, char *data, int len ) This reads stream data from socket s, data is the buffer to store the information and len is the length that should be read in. Returns the amount of data actually read in. int writemsgconn( int s, char *data, int len ) This sends message data (IE header & seq), the return values and variables are the same as writeconn(). int readmsgconn( int s, char *data, int len ) This function is like readconn() except it reads in message data ( IE header & seq). void nodelay( int s ) This turns nodelay on, given socket s. void setnonblocking( int s) This makes socket s, nonblocking. void setblocking( int s) This makes socket s, blocking. int setsendrecvbufs( int s, int bufsize ) This sets the send/recv buffers to size bufsize double sec_time() Returns time in seconds as a double Compiling: To compile conn.c, all you have to do is treat it like any other .c file to include in your program, for example: gcc -c conn.c Would create an object file that you could link into your program. conn.h is the include file, your program needs.