XNET TCP Socket Write (Binary) VI
- Updated2024-07-10
- 3 minute(s) read
Writes binary data to a TCP network connection.

Inputs/Outputs
![]() 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. ![]() data is the data to write to the connection. ![]() 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. ![]() 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. ![]() socket out is the same value as socket in. ![]() 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. ![]() 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. |