TcpIp_ReadBuffer


Receives a fixed number of bytes from a connected TCP socket.

Syntax

C++
Python
 
def TcpIp_ReadBuffer(
	inSocket: int,
	inLength: int,
	/,
	*,
	inTimeout: int | None = None,
	inAcceptEof: bool = False
)
-> (
	outBuffer: ByteBuffer | None,
	outEof: bool
)

Parameters

Name Type Range Default Description
Input value inSocket int Connected socket ID.
Input value inLength int 1 - 20971520 Number of bytes to receive.
Input value inTimeout int | None 0 - None Timeout in milliseconds, block if not specified.
Input value inAcceptEof bool False When false, throws an IoError on attempt to read data from beyond the end of stream; when true interrupts operation without exception in such a case.
Output value outBuffer ByteBuffer | None Buffer with raw received data, or Nil if the operation was interrupted (by timeout or reading beyond the end of stream).
Output value outEof bool Indicates whether the operation was interrupted on attempt to get data from beyond the end of stream.