klyn.net.ssl.SSLSocket.receiveInto
method
public receiveInto(notnull buffer as Byte[], offset as Long = 0l, length as Long = -1l) as Long
Description

Receives bytes directly into a reusable buffer without changing its size. The call may return fewer bytes than requested; zero indicates TLS EOF.

Parameters
ParameterDescription
bufferDestination Byte array; never retained by the socket.
offsetFirst destination byte.
lengthMaximum count; -1 uses the remaining buffer capacity.
Returns

Received byte count.

Throws
  • IndexException for an invalid destination range.
  • SSLException for a disconnected socket or failed TLS read.
Example

count = socket.receiveInto(buffer, 0l, 65536l)