Waits for an accepted TCP network connection.
Use this node with TCP Create Listener to create and listen for connections on the server.
A network connection refnum that uniquely identifies the listener.
Use TCP Create Listener to generate a refnum to wire to this input.
Time, in milliseconds, that the node waits for a connection. If the node cannot establish a connection in the specified time, the node returns an error.
Default: -1 — This node waits indefinitely for a connection.
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
Default: No error
The same network connection refnum as listener ID in. Use this value to refer to the listener in subsequent calls to this node.
The network address of the client that establishes a connection with this server.
The port on the client that establishes a connection with the server.
This node can return the following error codes.
56 | The network operation exceeded the user-specified or system time limit. This may occur if the application closes the listener while waiting on the listener. |
66 | The network operation was closed by the peer. This may occur if the application closes the listener while waiting on the listener. |
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
A network connection refnum that uniquely identifies the connection. Use this value to refer to this connection in subsequent node calls.
You can choose one of the following techniques to wait for an incoming connection:
The advantage of using TCP Create Listener and TCP Wait on Listener is that you can listen for a connection without using a timeout. You can also explicitly close the listener, or you can cancel the listen when another condition becomes true.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application