#ifndef SOCKS_H #define SOCKS_H /////////////////////////////////////////////////////////////// // socks.h - socket client and multi-threaded server // // prototype for project #2 // // // // Jim Fawcett, CSE691/791 - SW Modeling & Analysis, F01 // /////////////////////////////////////////////////////////////// // // your manual page and maintenance pages goe here // #include #include class connectionHandler; // this class will eventually provide // thread processing functionality class IPaddress; // this class will eventually handle // either IP address s or machine name class connectionHandler { public: connectionHandler() {}; private: }; /////////////////////////////////////////////////////////////// // socket client class declaration // /////////////////////////////////////////////////////////////// class sockSvr { public: sockSvr(); virtual ~sockSvr(); void start(); bool handleConnection(connectionHandler &ch); protected: SOCKET _listener; connectionHandler _ch; static unsigned int __stdcall threadProc(void *pArgs); static CRITICAL_SECTION _cs; }; // /////////////////////////////////////////////////////////////// // socket client class declaration // /////////////////////////////////////////////////////////////// typedef std::string address; class sockClt { public: sockClt(); virtual ~sockClt(); bool connectTo(address &addr); bool connectTo(const char *s); sockClt& operator<<(std::string &s); sockClt& operator<<(const char *s); sockClt& operator>>(std::string &s); protected: SOCKET _client; int send(const char *block); }; #endif