no upgrade or change at this. move to new Library for WIZ550io, W5500 -> http://mbed.org/teams/EthernetInterfaceW5500-makers/code/W5500Interface/
Dependents: LPC11U68_NTPClient_HelloWorld_WIZ550io
Fork of WIZ550ioInterface by
please get the new Library for WIZ550io, W5500 (WIZnet) http://mbed.org/teams/EthernetInterfaceW5500-makers/code/W5500Interface/
Import libraryW5500Interface
This is the Interface library for WIZnet W5500 chip which forked of EthernetInterfaceW5500, WIZnetInterface and WIZ550ioInterface. This library has simple name as "W5500Interface". and can be used for Wiz550io users also.
Diff: Socket/Socket.cpp
- Revision:
- 5:fb15c35d1e28
- Parent:
- 1:fb4494783863
- Child:
- 11:5a5a3f373a6b
--- 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() {