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.

Dependents:   EvrythngApi Websocket_Ethernet_HelloWorld_W5500 Websocket_Ethernet_W5500 CurrentWeatherData_W5500 ... more

Information

It has EthernetInterface class like official EthernetInterface , but uses Wiznet chip driver codes.

So this library can use only the WIZnet W5500 or WIZ550io users.

This library has referred to many project such as WIZ550ioInterface, WiflyInterface and WIZnet Library.

Thanks all.

Files at this revision

API Documentation at this revision

Comitter:
Bongjun
Date:
Mon Sep 01 01:54:29 2014 +0000
Parent:
3:a5d99521e9cc
Child:
5:8aefaef88f79
Commit message:
Correction of a bug in socket::close() via Pull Request of Patrick Pollet

Changed in this revision

Socket/Socket.cpp Show annotated file Show diff for this revision Revisions of this file
Socket/TCPSocketServer.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Socket/Socket.cpp	Wed Aug 20 05:37:05 2014 +0000
+++ b/Socket/Socket.cpp	Mon Sep 01 01:54:29 2014 +0000
@@ -35,8 +35,11 @@
 int Socket::close()
 {
     // add this code refer from EthernetInterface.
+    // update by Patrick Pollet
+    int res;
+    res = eth->close(_sock_fd);
     _sock_fd = -1;
-    return (eth->close(_sock_fd)) ? 0 : -1;
+    return (res)? 0: -1;
 }
 
 Socket::~Socket()
--- a/Socket/TCPSocketServer.cpp	Wed Aug 20 05:37:05 2014 +0000
+++ b/Socket/TCPSocketServer.cpp	Mon Sep 01 01:54:29 2014 +0000
@@ -81,11 +81,15 @@
     // and then, for the next connection, server socket should be assigned new one.
     _sock_fd = -1; // want to assign new available _sock_fd.
     if(bind(listen_port) < 0) {
-        error("No more socket for listening");
+        // modified by Patrick Pollet
+        error("No more socket for listening, bind error");
+        return -1;
     } else {
         //return -1;
         if(listen(1) < 0) {
-            error("No more socket for listening");
+            // modified by Patrick Pollet
+            error("No more socket for listening, listen error");
+            return -1;
         }
     }
     return 0;