Opens a TCP network connection using a specified address and port.


icon

Inputs/Outputs

  • cgenclassrntag.png stack

    stack is the XNET IP Stack in which the new socket is opened.

  • cstr.png remote address

    remote address is the IP address with which you want to establish a connection.

  • cu16.png remote port

    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.

  • ci32.png timeout ms (60000)

    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.

  • cerrcodeclst.png error in

    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.

  • cu16.png local port

    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.

  • cstr.png local interface

    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):

    • virtual interface name (recommended)
    • string that represents the decimal value of ifIndex
    • IP address (see Supported Features)

    This input is optional. If local interface is empty (default), the socket is bound to any virtual interface in the IP stack.

  • igenclassrn.png socket

    socket is a network connection refnum that uniquely identifies the connection. Use this value to refer to this connection in subsequent VI calls.

  • ierrcodeclst.png error out

    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.