// This class is (c) 1998 Ron Katzir.
// Use freely, but give credit to me as the originator.

extern "C" {
#include <netdb.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <fcntl.h>
}
#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;



syntax highlighted by Code2HTML, v. 0.9.1