XNET TCP Socket Read (Binary) VI
- Updated2025-10-07
- 3 minute(s) read
Reads a number of bytes from a TCP network connection and returns the results as binary data.

Inputs/Outputs
mode (standard)
—
mode (standard) specifies the behavior of the read operation. The default value is standard.
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.
bytes to read
—
bytes to read is the number of bytes this VI reads. The default value is 0. Wire a value greater than 0 to this input to read data.
timeout ms (25000)
—
timeout ms (25000) specifies the time, in milliseconds, that the VI waits to complete before returning a timeout error. The default value is 25,000 ms. Wire a -1 to this input to wait indefinitely.
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.
socket out
—
socket out is the same value as socket in.
data
—
data is the data read from the TCP connection.
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. |
mode (standard)
—
socket in
—
bytes to read
—
error in
—
socket out
—
data
—
error out
—