A new object oriented network api that can be used to replace the one provided by the EthernetInterface library.
Dependents: NetRelais TCP_Client_Example TCP_Server_Example UDP_Server_Example ... more
Object oriented network interface for the mbed platform
Currently implemented:
- Address
- Endpoint
- UDP Socket
- TCP Socket
- Databuffer
- Select API
It depends on the EthernetInterface for the lwip network stack.
Please do not hesitate to contact me with any remarks, improvements or questions.
The API is also available for unix at GitHub: LibNosa
Examples
Diff: socket.cpp
- Revision:
- 8:cdee0f2b6ff0
- Parent:
- 3:d30db8752485
--- a/socket.cpp Wed Jul 18 19:43:12 2012 +0000 +++ b/socket.cpp Thu Sep 27 09:31:40 2012 +0000 @@ -52,7 +52,7 @@ } // Close the socket - int result = ::close(this->_socket); + int result = lwip_close(this->_socket); this->_socket = -1; // Update status and return @@ -75,7 +75,7 @@ this->_local_endpoint.toNative(&native_endpoint); // Bind socket to endpoint - if (::bind(this->_socket, + if (lwip_bind(this->_socket, (const struct sockaddr *)&native_endpoint, sizeof(native_endpoint)) < 0) {