klyn.net.ssl.SSLSocket.receive
method

    public receive(maxBytes as Int = 4096) as String throws SSLException:

Description

Receives up to `maxBytes` bytes interpreted as text.

Parameters

- maxBytes Maximum number of bytes to read.

Returns

Received text. ```klyn import klyn.net.ssl socket = SSLSocket("example.com", 443) print(socket.receive(512)) socket.close()` ``

Throws

- SSLException if the TLS socket is not connected/configured correctly or a TLS transport operation fails.