mbed socket API

Dependents:   EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more

Deprecated

This is an mbed 2 sockets library. For mbed 5, network sockets have been revised to better support additional network stacks and thread safety here.

Revision:
5:300e7ad2dc1d
Parent:
4:75988d748e4d
Child:
6:cd2e5559786d
--- a/TCPSocketConnection.h	Thu Jul 26 10:07:43 2012 +0000
+++ b/TCPSocketConnection.h	Thu Jul 26 15:07:32 2012 +0000
@@ -20,11 +20,12 @@
 #define TCPSOCKET_H
 
 #include "Socket/Socket.h"
+#include "Socket/Endpoint.h"
 
 /**
 This is a C++ abstraction for TCP networking sockets.
 */
-class TCPSocketConnection : public Socket {
+class TCPSocketConnection : public Socket, Endpoint {
     friend class TCPSocketServer;
     
 public:
@@ -72,15 +73,9 @@
     \return the number of received bytes on success (>=0) or -1 on failure
     */
     int receive_all(char* data, int length, int timeout=0);
-    
-    char* get_address();
-    int   get_port();
-    
+
 private:
-    char _ipAddress[16];
-    
     bool _closedByRemoteHost;
-    struct sockaddr_in _remoteHost;
 
 };