Base class for IP Based Networking Libraries
Dependencies: DnsQuery
Dependents: TempTower BSDInterfaceTests HelloBSDInterface ESP8266InterfaceTests ... more
You are viewing an older revision! See the latest version
Homepage
What is this¶
NetworkSocketAPI provides stubs of functions to be implemented. These two .h files should be implemented elsewhere and serve as a virtual base class that connects all network socket implementations (Ethernet/Wifi/Cellular/Any IP Based interface ... etc).
Implementation¶
- The SocketInterface.h functions should be implemented in the socket folder in the Interface library. (ie WifiInterface/sockets/sockets.c/.h
- The NetworkInterface functions should be implemented in the Interface.c and Interface.h files in the interface library. (ie WifiInterface.c/.h)
How to Use¶
This library should be included at the top level of your program. Nothing should be changed in this library. You should then do your DeviceInterface implementation according to the implementation section above. By having this virtual base class at the top level of your project it will enable multiple endpoints and multiple devices to be used in the same project. (Think a gateway that has both a Ethernet and Wifi peripheral, by having the virtual base class at the top level you will be able to pull from it and access each one individually)