scuttlebutt-handshake / org.apache.tuweni.scuttlebutt.handshake / SecureScuttlebuttStreamClient / readFromServer

readFromServer

abstract fun readFromServer(message: Bytes): Bytes (source)

Adds message bytes to the reader stream, returning the bytes that could be decrypted.

Parameters

message - the message to decrypt

Exceptions

StreamException - if the message cannot be decrypted

Return
the message, decrypted and ready for consumption, or null if the message provided were an incomplete message.