//Socket.h #define RECBUFFER 2000 #include #include #include class Sockets { struct sockaddr_in Sock; std::string saddress; int sport, shandle, stype; int numhandles, retval; int sock_size; public: Sockets(); ~Sockets(); void Show(); bool Init(std::string addr, int prt); bool Bind(int sock_num); bool Connect(); bool Listen(); bool Accept(); bool Recv(std::string& rec); bool Send(std::string buf); bool SendFile(std::string sendfile); bool Close(int hand); bool Close(); Sockets& operator << (std::string buf); };