// NFSocket class declaration // HttpSocket class declaration // Foota Software, 6 Jun. 2004 // version 0.10 #include #include using namespace std; class NFSocket { private: WSADATA m_wsadata; SOCKET m_socket; SOCKET m_socket_client; public: NFSocket(); virtual ~NFSocket(); protected: int Init(); int Term(); int Bind(const struct sockaddr *addr, int namelen); int Listen(int backlog = 3); int Accept(struct sockaddr *addr, int *addrlen); int Connect(const struct sockaddr *name, int namelen); int Open(int af, int type, int protocol); int Close(); int Shutdown(int how); public: int Send(const char *buf, int len, int flags); int Recv(char *buf, int len, int flags); }; class HttpSocket : public NFSocket { public: HttpSocket(); virtual ~HttpSocket(); public: int Init(); int Term(); int Connect(string servername); int Shutdown(); };