otTcpReceiveAvailable
This callback indicates the number of bytes available for consumption from the receive buffer. It is called whenever bytes are added to the receive buffer and when the end of stream is reached. If the end of the stream has been reached (i.e., if no more data will become available to read because the connection peer has closed their end of the connection for writing), then @p aEndOfStream is true. Finally, @p aBytesRemaining indicates how much capacity is left in the receive buffer to hold additional data that arrives.
Syntax
typedef void (*otTcpReceiveAvailable)(otTcpEndpoint *aEndpoint,
size_t aBytesAvailable,
bool aEndOfStream,
size_t aBytesRemaining);