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 WIZ820ioInterface by
Diff: Socket/Socket.cpp
- Revision:
- 5:fb15c35d1e28
- Parent:
- 1:fb4494783863
diff -r 0bcec6272784 -r fb15c35d1e28 Socket/Socket.cpp
--- a/Socket/Socket.cpp Thu Dec 20 15:08:58 2012 +0000
+++ b/Socket/Socket.cpp Tue Aug 27 12:50:11 2013 +0000
@@ -17,12 +17,12 @@
*/
#include "Socket.h"
-#include <cstring>
-Socket::Socket() : _blocking(true), _timeout(1500) {
- wifi = Wifly::getInstance();
- if (wifi == NULL)
- error("Socket constructor error: no wifly instance available!\r\n");
+Socket::Socket() : _sock_fd(-1),_blocking(true), _timeout(1500) {
+ eth = WIZ820io::getInstance();
+ if (eth == NULL) {
+ error("Socket constructor error: no WIZ8820io instance available!\r\n");
+ }
}
void Socket::set_blocking(bool blocking, unsigned int timeout) {
@@ -31,7 +31,7 @@
}
int Socket::close() {
- return (wifi->close()) ? 0 : -1;
+ return (eth->close(_sock_fd)) ? 0 : -1;
}
Socket::~Socket() {
