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 GPRSInterface by
Diff: Socket/Socket.cpp
- Revision:
- 1:7298a7950f65
- Parent:
- 0:8ccbd963e74d
- Child:
- 3:acf2ea413e72
diff -r 8ccbd963e74d -r 7298a7950f65 Socket/Socket.cpp
--- a/Socket/Socket.cpp Tue Feb 25 02:52:48 2014 +0000
+++ b/Socket/Socket.cpp Tue Feb 25 05:56:19 2014 +0000
@@ -22,22 +22,17 @@
#include "Socket.h"
-Socket::Socket() : _sock_fd(-1),_blocking(true), _timeout(1500) {
+Socket::Socket() : _sock_fd(-1) {
gprs = GPRS::getInstance();
if (gprs == NULL) {
- error("Socket constructor error: no WIZ8820io instance available!\r\n");
+ error("Socket constructor error: no GPRS instance available!\r\n");
}
}
-void Socket::set_blocking(bool blocking, unsigned int timeout) {
- _blocking = blocking;
- _timeout = timeout;
-}
-
int Socket::close() {
return (gprs->close(_sock_fd)) ? 0 : -1;
}
Socket::~Socket() {
- close(); //Don't want to leak
+ close();
}