// This class is (c) 1998 Ron Katzir. // Use freely, but give credit to me as the originator. extern "C" { #include #include #include #include #include #include #include #include #include #include #include } #include "common.h" #define BUFSIZE 8192 typedef class server *ServerP; typedef class server { public: server(char *, unsigned long); void readport(); char *nextline(); int writeport(char *, ...); int sockfd(); ~server(); private: int noFullLine(); char *returnWholeBuffer(); int connectto(char *, unsigned long); char buf[BUFSIZE+1]; int inbuf; int soc; } Server;