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.

Files at this revision

API Documentation at this revision

Comitter:
emilmont
Date:
Mon Aug 13 09:38:00 2012 +0000
Parent:
14:c159ce890a45
Child:
16:2d471deff212
Commit message:
Reset TCPSocketConnection address when accepting a new connection

Changed in this revision

TCPSocketServer.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TCPSocketServer.cpp	Sat Aug 04 08:28:29 2012 +0000
+++ b/TCPSocketServer.cpp	Mon Aug 13 09:38:00 2012 +0000
@@ -66,6 +66,7 @@
         if (wait_readable(timeout) != 0)
             return -1;
     }
+    connection.reset_address();
     socklen_t newSockRemoteHostLen = sizeof(connection._remoteHost);
     int fd = lwip_accept(_sock_fd, (struct sockaddr*) &connection._remoteHost, &newSockRemoteHostLen);
     if (fd < 0)