Writes binary data to a TCP network connection.


icon

Inputs/Outputs

  • cgenclassrn.png socket in

    socket in is a network connection refnum that uniquely identifies the TCP socket. Use XNET TCP Socket Open or XNET TCP Socket Wait on Listener to generate a refnum to wire to this input.

  • c1du8.png data

    data is the data to write to the connection.

  • ci32.png timeout ms (25000)

    timeout ms (25000) is the time, in milliseconds, that the VI waits to complete before reporting a timeout error. The default is 25,000 ms. 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.

  • igenclassrn.png socket out

    socket out is the same value as socket in.

  • ii32.png bytes written

    bytes written is the number of bytes the VI writes to the connection.

    If the number of bytes written is fewer than the number of bytes in data in, an error has occurred. For example, this VI may have timed out before all the data was transmitted. Use this output to determine what data has been successfully written and possibly retry writing any remaining data.

  • 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.