No more update~~ please use W5500Interface.
Fork of EthernetInterfaceW5500 by
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.
Diff: Socket/UDPSocket.h
- Revision:
- 10:cadac6bcd169
- Parent:
- 5:fb15c35d1e28
--- a/Socket/UDPSocket.h Mon Dec 23 13:51:35 2013 +0000 +++ b/Socket/UDPSocket.h Thu Jul 17 07:10:36 2014 +0000 @@ -19,30 +19,31 @@ #ifndef UDPSOCKET_H #define UDPSOCKET_H -#include "Endpoint.h" -#include "Socket.h" +#include "Socket/Socket.h" +#include "Socket/Endpoint.h" /** UDP Socket */ -class UDPSocket: public Socket { +class UDPSocket: public Socket +{ public: /** Instantiate an UDP Socket. */ UDPSocket(); - + /** Init the UDP Client Socket without binding it to any specific port \return 0 on success, -1 on failure. */ int init(void); - + /** Bind a UDP Server Socket to a specific port \param port The port to listen for incoming connections on \return 0 on success, -1 on failure. */ int bind(int port = -1); - + /** Send a packet to a remote endpoint \param remote The remote endpoint \param packet The packet to be sent @@ -50,7 +51,7 @@ \return the number of written bytes on success (>=0) or -1 on failure */ int sendTo(Endpoint &remote, char *packet, int length); - + /** Receive a packet from a remote endpoint \param remote The remote endpoint \param buffer The buffer for storing the incoming packet data. If a packet @@ -59,7 +60,7 @@ \return the number of received bytes on success (>=0) or -1 on failure */ int receiveFrom(Endpoint &remote, char *buffer, int length); - + private: void confEndpoint(Endpoint & ep); void readEndpoint(Endpoint & ep, uint8_t info[]);