Oh, and my tcp.h just for giggles.


Code:
#define DNS_FAILURE     -1
#define SOCKET_FAILURE  -2
#define CONNECT_FAILURE -3

int  init_winsock(void);
int  connect_to_host(char* hostname, int port);
int  read_from_socket(char * buf, int bufsize);
void write_to_socket(char * buf);
void shutdown_winsock(void);
void close_connection(void);