TLSSocket
TCP socket that supports encryption via TLS.
To construct a
TLSSocket
, use the client
and server
methods on TLSContext
.- Companion
- object
Value members
Methods
Inherited methods
Reads stream of bytes from this socket with
On timeout, this fails with
read
semantics. Terminates when eof is received.On timeout, this fails with
java.nio.channels.InterruptedByTimeoutException
.- Inhertied from
- Socket
Indicates that this channel will not read more data. Causes
End-Of-Stream
be signalled to available
.- Inhertied from
- Socket
Writes
and the operation does not complete in the specified duration,
the returned
bytes
to the peer. If timeout
is providedand the operation does not complete in the specified duration,
the returned
Process
fails with a java.nio.channels.InterruptedByTimeoutException
.Completes when bytes are written to the socket.
- Inhertied from
- Socket
Reads exactly
If
failure with
numBytes
from the peer in a single chunk.If
timeout
is provided and no data arrives within the specified duration, then this results infailure with
java.nio.channels.InterruptedByTimeoutException
.When returned size of bytes is <
numBytes
that indicates end-of-stream has been reached.- Inhertied from
- Socket
Reads up to
maxBytes
from the peer.Evaluates to None, if there are no more bytes to be read in future, due stream reached End-Of-Stream state
before returning even single byte. Otherwise returns Some(bytes) with bytes that were ready to be read.
before returning even single byte. Otherwise returns Some(bytes) with bytes that were ready to be read.
If
if read was not satisfied in given timeout. Read is satisfied, when at least single Byte was received
before
timeout
is specified, then resulting F
will evaluate to failure with java.nio.channels.InterruptedByTimeoutException
if read was not satisfied in given timeout. Read is satisfied, when at least single Byte was received
before
timeout
expires.This may return None, as well when end of stream has been reached before timeout expired and no data
has been received.
has been received.
- Inhertied from
- Socket