No more update~~ please use W5500Interface.

Fork of EthernetInterfaceW5500 by Bongjun Hur


Bongjun Hur wrote:

NO more update for this library.

Please move to this page W5500Interface for newer version.

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.

This Library for W5500 users. no need to use lwIP(or S/W TCP/IP) Some update & code clean for W5500 only refer from WIZ550ioInterface, WIZnetLibrary and WiflyInterface.

Thanks for ban4jp. This library forks of WIZ550ioInterface.

Revision:
10:cadac6bcd169
Parent:
5:fb15c35d1e28
--- a/Socket/TCPSocketConnection.h	Mon Dec 23 13:51:35 2013 +0000
+++ b/Socket/TCPSocketConnection.h	Thu Jul 17 07:10:36 2014 +0000
@@ -19,59 +19,62 @@
 #ifndef TCPSOCKET_H
 #define TCPSOCKET_H
 
-#include "Socket.h"
-#include "Endpoint.h"
-
+#include "Socket/Socket.h"
+#include "Socket/Endpoint.h"
 /**
 TCP socket connection
 */
-class TCPSocketConnection: public Socket, public Endpoint {
+class TCPSocketConnection: public Socket, public Endpoint
+{
     friend class TCPSocketServer;
-    
+
 public:
     /** TCP socket connection
     */
     TCPSocketConnection();
-    
+
     /** Connects this TCP socket to the server
     \param host The host to connect to. It can either be an IP Address or a hostname that will be resolved with DNS.
     \param port The host's port to connect to.
     \return 0 on success, -1 on failure.
     */
     int connect(const char* host, const int port);
-    
+
     /** Check if the socket is connected
     \return true if connected, false otherwise.
     */
     bool is_connected(void);
-    
+
     /** Send data to the remote host.
     \param data The buffer to send to the host.
     \param length The length of the buffer to send.
     \return the number of written bytes on success (>=0) or -1 on failure
      */
     int send(char* data, int length);
-    
+
     /** Send all the data to the remote host.
     \param data The buffer to send to the host.
     \param length The length of the buffer to send.
     \return the number of written bytes on success (>=0) or -1 on failure
     */
     int send_all(char* data, int length);
-    
+
     /** Receive data from the remote host.
     \param data The buffer in which to store the data received from the host.
     \param length The maximum length of the buffer.
     \return the number of received bytes on success (>=0) or -1 on failure
      */
     int receive(char* data, int length);
-    
+
     /** Receive all the data from the remote host.
     \param data The buffer in which to store the data received from the host.
     \param length The maximum length of the buffer.
     \return the number of received bytes on success (>=0) or -1 on failure
     */
     int receive_all(char* data, int length);
+
+private:
+    bool _is_connected;
 };
 
 #endif