A COM port server has two operating modes:
- Server mode: The COM port server waits for requests from a defined TCP port to establish TCP connections. The mode is used for remote maintenance, for example.
- Client mode: As soon as a device connected to the serial interface becomes active, the COM port client opens a TCP connection to a preset remote site. This operating mode is used, for example, for devices that have just one serial interface but requiring network access.
In both of these cases a transparent connection is set up between the serial interface and the TCP connection. Data packets received at the serial interface are forwarded to the TCP connection, and vice versa. A common server-mode application is to install a virtual COM port driver at the remote site which connects to the COM port server. Drivers of this type allow applications running at the remote site to use the TCP connection as if it were an additional COM port. The IETF RFC 2217 standard sets down the Telnet WILL/DO protocol extensions, which transmit the negotiations for the serial connection (bitrate, data and stop bits, handshake) to the COM port server. The use of this protocol is optional, so practical default values can be set in the COM port server.