This is a non working version of my ethernet with sd card, i do not know why
Dependencies: SDFileSystem mbed
Fork of eth_v13 by
Diff: TCPSocket.h
- Revision:
- 2:8f5bacfef390
- Child:
- 3:79dc3337d9da
diff -r f45d6c8ec0a9 -r 8f5bacfef390 TCPSocket.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TCPSocket.h Tue Mar 18 22:51:18 2014 +0000 @@ -0,0 +1,23 @@ +#ifndef TCPSOCKET_H +#define TCPSOCKET_H + +#include "ipaddr.h" + +class TCPSocket +{ + int _socket; + int _port; + void (*m_pCb)(void); + +public: + TCPSocket(int newSocket); + + void bind(int port); + void listen(); + void close(); + int send(const char* buf, int len); + int recv(char* buf, int len); + void poll(); + void setOnEvent(void (*pMethod)(void)); +}; +#endif // MYUDPSOCKET_H