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 | |
|---|---|---|---|---|---|
![]() |
inSocket | int | Connected socket ID. | ||
![]() |
inLength | int | 1 - 20971520 | Number of bytes to receive. | |
![]() |
inTimeout | int | None | 0 - ![]() |
None | Timeout in milliseconds, block if not specified. |
![]() |
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. | |
![]() |
outBuffer | ByteBuffer | None | Buffer with raw received data, or Nil if the operation was interrupted (by timeout or reading beyond the end of stream). | ||
![]() |
outEof | bool | Indicates whether the operation was interrupted on attempt to get data from beyond the end of stream. |



