Start » Filter Reference » System » TCP IP » TcpIp_ReadAllBuffer
Module: | FoundationLite |
---|
Receives data from a connected socket until the other side closes connection.
Name | Type | Range | Description | |
---|---|---|---|---|
inSocket | SocketId | Connected socket ID, will be closed if successfully read. | ||
inTimeout | Integer* | 0 - | Timeout in milliseconds, block if not specified. | |
outBuffer | ByteBuffer? | Buffer with raw received data, or Nil if the operation was interrupted by timeout. | ||
outEof | Bool | Indicates whether the operation successfully read data to the end of stream. |
Description
Reads all data until the other side stops sending and closes the connection on its side.
The inTimeout input specifies the longest possible waiting time, in milliseconds, for the incoming data to be fully received. When no timeout is specified (set to Auto), the execution is blocking. When the filter execution is terminated by timeout condition no data is returned or removed from the input buffer (Nil is returned instead). In such situation the operation can be retried later. When timeout is et to zero the filter performs a single read attempt and returns immediately when no data is available.
outBuffer is a buffer containing raw binary data (a sequence of bytes). Data buffer can be processed using filters from the Binary Data category.
outEof output is set to True when data was successfully received and the connection is closed by the other side. This output can be used as a more convenient way to detect end of communication in the application.
This filter can raise IoError when the connection is disruptively broken or when other network-related error occurred.
Hints
- Connect inSocket with the output of TcpIp_Connect or TcpIp_Accept.
- Set inTimeout if you want the filter to abort waiting for data after a predefined time.
Examples
Remarks
User manual
For more information about using this filter, please follow the link: Using TCP/IP Communication.
Complexity Level
This filter is available on Basic Complexity Level.
Disabled in Lite Edition
See Also
- TcpIp_WriteBuffer – Outputs a block of raw data through a connected TCP socket.
- TcpIp_WriteText – Outputs a string through a connected TCP socket.
- TcpIp_ReadLine – Reads from a connected TCP socket until receiving a specific sequence.
- TcpIp_Close – Closes a connected TCP socket gracefully.
Application Notes: Using TCP IP Communication - document about connecting devices or establishing communication with Aurora Vision Studio.