#ifndef TCPIP_CTRL_H #define TCPIP_CTRL_H #include "connectionInterface.h" #include <SDL_net.h> #include <memory> class SocketSet; class TcpipCtrl : public ConnectionInterface { TcpipCtrl(const TcpipCtrl& rhs); TcpipCtrl& operator = (const TcpipCtrl& rhs); struct pImpl; std::auto_ptr<pImpl> pimpl; public: enum { NoTimeout = -1 }; explicit TcpipCtrl(void); explicit TcpipCtrl(SocketSet* socketSet, TCPsocket scoket = NULL); ~TcpipCtrl(void); const char* what(void); int connect(const char* host, long port); void disconnect(void); bool isConnected(void); int changeBaudrate(long baudrate); int send(const char* data, int size); int recv(char* data, int size, int timeout); int size(void); void clear(void); }; #endif /* !TCPIP_CTRL_H */