Network Callbacks
Following network callbacks are to be implemented by application. The callbacks use BSD Sockets API compliant interface and use data structures compliant to the same API.
| Callback | Description |
|---|---|
| SOCK_CREATE_CB | socket() |
| SOCK_CLOSE_CB | close() |
| SOCK_BIND_CB | bind() |
| SOCK_SENDTO_CB | sendto() |
| SOCK_RECEIVEFROM_CB | recvfrom() |
| SOCK_IOCTL_CB | ioctl() or ioctlsocket() |
| INET_PTON_CB | inet_pton() |
| INET_NTOP_CB | inet_ntop() |
| NET_MATCH_SUBNET_CB | This is a purely user implementation called by signaling to check whether two addresses are on the same subnet. |
| NET_GET_LOCAL_ADDR_CB | This is a purely user implementation called by signaling to get mapped public address corresponding to given interface address (assuming client is behind NAT). Any NAT traversing algorithm may be implemented to get mapped address. |
| NET_GET_MAPPED_ADDR_CB | This is a purely user implementation called by signaling to get mapped public address corresponding to given interface address (assuming client is behind NAT). Any NAT traversing algorithm may be implemented to get mapped address. |
| NET_RESOLVE_HOST_CB | This is a purely user implementation called by signaling to resolve FQDN to IPv4/IPv6 address. See demo for example. |