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 MTS-Socket by
Socket.cpp
00001 #include "Socket.h" 00002 #include <cstring> 00003 #include "Transport.h" 00004 00005 Socket::Socket() : _blocking(true), _timeout(1500) { 00006 ip = Transport::getInstance(); 00007 } 00008 00009 void Socket::set_blocking(bool blocking, unsigned int timeout) { 00010 _blocking = blocking; 00011 _timeout = timeout; 00012 } 00013 00014 int Socket::close(bool shutdown) { 00015 return (ip->close(shutdown)) ? 0 : -1; 00016 } 00017 00018 Socket::~Socket() { 00019 close(true); //Don't want to leak 00020 }
Generated on Wed Jul 13 2022 10:29:47 by
