XNET TCP Socket Open VI
- Updated2025-07-07
- 3 minute(s) read
Opens a TCP network connection using a specified address and port.

Inputs/Outputs
![]() stack is the XNET IP Stack in which the new socket is opened. ![]() remote address is the IP address with which you want to establish a connection. ![]() remote port is the port on the server with which you want to establish a connection. If you wire a value of 0 to this input, this VI returns an error. ![]() timeout ms (60000) specifies the time, in milliseconds, that the VI waits to complete before reporting a timeout error. The default value is 60,000 ms (1 minute). Wire a –1 to this input to wait indefinitely. ![]() The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. ![]() local port is the local connection port. Some servers only allow connections to clients that use port numbers within a specific range that is dependent on the server. If the value is 0, the XNET IP stack selects an unused port. The default is 0. ![]() local interface identifies a specific virtual interface in the IP Stack on which to bind the socket. The virtual interface is identified using one of the following (as returned from XNET IP Stack Get Info.vi):
This input is optional. If local interface is empty (default), the socket is bound to any virtual interface in the IP stack. ![]() socket is a network connection refnum that uniquely identifies the connection. Use this value to refer to this connection in subsequent VI calls. ![]() The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |