TcpIp_ReadLine


Reads from a connected TCP socket until receiving a specific sequence.

Syntax

C++
Python
 
def TcpIp_ReadLine(
	inSocket: int,
	/,
	*,
	inDelimiter: str = "\"\\\\r\\\\n\"",
	inTimeout: int | None = None,
	inAcceptEof: bool = False,
	inMode: DelimiterHandling = DelimiterHandling.Include
)
-> (
	outText: str | None,
	outEof: bool
)

Parameters

Name Type Range Default Description
Input value inSocket int Connected socket ID.
Input value inDelimiter str "\"\\\\r\\\\n\"" Terminating character sequence, escaped.
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.
Input value inMode DelimiterHandling DelimiterHandling.Include Delimiter handling mode.
Output value outText str | None Received data as textual string, 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.