For a question in forum this is a working example, there will be the example that is not working

Dependencies:   mbed

Fork of eth_v13 by Heiko Greiner

Revision:
2:8f5bacfef390
Child:
3:79dc3337d9da
--- /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