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
Diff: Socket.cpp
- Revision:
- 11:3d83c348fb8b
- Parent:
- 10:d24738f4ef99
- Child:
- 16:2d471deff212
diff -r d24738f4ef99 -r 3d83c348fb8b Socket.cpp --- a/Socket.cpp Tue Jul 31 11:50:55 2012 +0000 +++ b/Socket.cpp Wed Aug 01 13:02:32 2012 +0000 @@ -20,7 +20,7 @@ using std::memset; -Socket::Socket() : _sock_fd(-1), _blocking(true), _timeout(3000) { +Socket::Socket() : _sock_fd(-1), _blocking(true), _timeout(1500) { } @@ -71,6 +71,10 @@ return 0; } +Socket::~Socket() { + close(); //Don't want to leak +} + TimeInterval::TimeInterval(unsigned int ms) { _time.tv_sec = ms / 1000; _time.tv_usec = (ms - (_time.tv_sec * 1000)) * 1000;