Receives text from a connected socket until the other side closes connection.
|inSocket||SocketId||Connected socket ID, will be closed if successfully read.|
|inTimeout||Integer*||0 -||Timeout in milliseconds, block if not specified.|
|outText||String?||Received data as textual string, or Nil if the operation was interrupted by timeout.|
|outEof||Bool||Indicates whether the operation successfully read data to the end of stream.|
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.
Received bytes are interpreted as UTF-8 encoded text and returned on outText output. When received data is not in a valid UTF-8 encoding an IOError is raised.
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.
For more information about using this filter, please follow the link: Using TCP/IP Communication.
This filter is available on Basic Complexity Level.