Complete the following steps to create a TCP server using the TCP functions.
- Use the TCP Listen VI or the TCP Create Listener and TCP Wait on Listener functions to wait for a connection. You must specify the port and optionally a service name. This port or service name must be the same port or service name that the client attempts to access.
- If a connection is established, use the TCP Write function to send a message to the client. The data must be in a form that the client can accept.
- Use the TCP Read function to read a message from the client.
- Use the TCP Close Connection function to close the connection.
Refer to the following VIs for examples of a TCP server:
- labview\examples\comm\TCP.llb\Simple Data Server.vi
- labview\examples\comm\TCP.llb\Named Service TCP Server.vi