W5200(WIZ820io) network interface
Diff: MyNetTcpSocket.h
- Revision:
- 0:61831b843b44
- Child:
- 1:803123933c5a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MyNetTcpSocket.h Sat Apr 14 17:21:11 2012 +0000 @@ -0,0 +1,24 @@ +// MyNetTcpSocket.h 2012/4/14 +#ifndef MYNETTCPSOCKET_H +#define MYNETTCPSOCKET_H +#include "if/net/nettcpsocket.h" + +class MyNetTcpSocket : public NetTcpSocket { +public: + MyNetTcpSocket(); + virtual ~MyNetTcpSocket(); + virtual NetTcpSocketErr bind(const Host& me); + virtual NetTcpSocketErr listen(); + virtual NetTcpSocketErr connect(const Host& host); + virtual NetTcpSocketErr accept(Host* pClient, NetTcpSocket** ppNewNetTcpSocket); + virtual int /*if < 0 : NetTcpSocketErr*/ send(const char* buf, int len); + virtual int /*if < 0 : NetTcpSocketErr*/ recv(char* buf, int len); + virtual NetTcpSocketErr close(); + virtual NetTcpSocketErr poll(); +protected: + int _socket; +private: + void cleanUp(); //Flush input buffer + queue<MyNetTcpSocket*> m_lpInNetTcpSocket; +}; +#endif //MYNETTCPSOCKET_H \ No newline at end of file