Skip to main content

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.

CallbackDescription
SOCK_CREATE_CBsocket()
SOCK_CLOSE_CBclose()
SOCK_BIND_CBbind()
SOCK_SENDTO_CBsendto()
SOCK_RECEIVEFROM_CBrecvfrom()
SOCK_IOCTL_CBioctl() or ioctlsocket()
INET_PTON_CBinet_pton()
INET_NTOP_CBinet_ntop()
NET_MATCH_SUBNET_CBThis is a purely user implementation called by signaling to check whether two addresses are on the same subnet.
NET_GET_LOCAL_ADDR_CBThis 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_CBThis 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_CBThis is a purely user implementation called by signaling to resolve FQDN to IPv4/IPv6 address. See demo for example.