Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Socket by
Revision 20:5cccc791add1, committed 2014-10-02
- Comitter:
- klauss
- Date:
- Thu Oct 02 12:37:35 2014 +0000
- Parent:
- 19:434906b5b977
- Commit message:
- debug msgs
Changed in this revision
| TCPSocketServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TCPSocketServer.cpp Mon Aug 19 18:38:18 2013 +0300
+++ b/TCPSocketServer.cpp Thu Oct 02 12:37:35 2014 +0000
@@ -16,6 +16,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "TCPSocketServer.h"
+#include "debug.h"
#include <cstring>
@@ -58,20 +59,27 @@
}
int TCPSocketServer::accept(TCPSocketConnection& connection) {
+ debug_msg("");
if (_sock_fd < 0)
return -1;
if (!_blocking) {
+ debug_msg("");
TimeInterval timeout(_timeout);
if (wait_readable(timeout) != 0)
return -1;
}
+ debug_msg("");
connection.reset_address();
+ debug_msg("");
socklen_t newSockRemoteHostLen = sizeof(connection._remoteHost);
+ debug_msg("");
int fd = lwip_accept(_sock_fd, (struct sockaddr*) &connection._remoteHost, &newSockRemoteHostLen);
if (fd < 0)
return -1; //Accept failed
+ debug_msg("");
connection._sock_fd = fd;
+ debug_msg("");
connection._is_connected = true;
return 0;
