Home |
Program TCPServer |
Program TCPServerTCPServer implements the framework for a simple TCP server. It listens for connect requests from an arbitrary number of clients. Whenever a new connection comes in, a separate thread is created to handle the new connection. When the client disconnects, the respective thread terminates. In this demo, the server merely receives strings and sends them back to the client. A sample client program to connect to this server is also included with this demo. It is the same program as for demo TCPClient, but built for Windows. When TCPServer is running on the target, you can start program TCPClient on the host with the target's IP address on the command line. TCPServer will display its IP address on the target's screen when it starts up. This demo can obtains its IP address from a DHCP server. If you have purchased the DHCP add-on for RTIP-32, you can define preprocessor symbol DHCP in the source code or on the compiler command line and add library Dhcpc.lib to enable this feature.
|