NetBurner 3.5.0
PDF Version
 
TCP Server Using Via

This example is based on the TCP Multi-Socket Server example, with the addition of the listenvia() function call to specify a specific network interface for multi-interface devices.

This program will create a TCP server task, with multiple listening sockets, one listening on all interfaces, and an additional socket each listening on a specific network interface. By default, these sockets listen on port 23 and incrementing from there. To test the application you can use Telnet. For example, from the command line, type: telnet <ip address> <port>

This example uses the select() method to handle the multiple sockets within the context of a single task.