.tlsgetdata Method

Function:

For the currently selected socket (selection is made through sock.num), returns the string that contains the decrypted data extracted from the TLS RX buffer.

Syntax:

sock.tlsgetdata(maxinplen as word) as string

Returns:

String containing decrypted data extracted from the TLS RX buffer.

See Also:

Transport Layer Security (TLS), Sending and Receiving Data, sock.getdata


Part

Description

maxinplen

The maximum amount of decrypted data bytes to return (word).


Details

The extracted data is permanently deleted from the buffer. The length of the extracted data is limited by one of three factors (whichever is smaller): the amount of data in the TLS RX buffer (see sock.tlsrxlen), the capacity of the "receiving" string variable, and the limit set by the maxinplen parameter. This method will return an empty string if called on a socket that is not running in the TLS mode (sock.tlscurrentnum <> sock.num).

A warning note icon.When in the TLS mode, sock.getdata should never be used, because attempting to retrieve the data from the RX buffer will likely result in the collapse of the secure connection.


.tlsgetdata Method

Details