send
Sends a JSON-RPC message using the transport layer.
This method ensures that the transport is operational before attempting to send the message. If the transport's state does not allow sending operations, an exception is thrown. It delegates the actual transmission to the abstract performSend method, which must be implemented by subclasses to handle the specifics of the transmission mechanism. Errors during the send operation are handled appropriately, and cancellation exceptions are always propagated.
Important! This method will eventually become final. Please don't override it, or consistency guarantees might be lost. Override performSend instead.
Parameters
The JSON-RPC message to be sent. Must adhere to the JSON-RPC 2.0 specification.
Optional parameters that influence how the message is transmitted, such as timeout specifications or message delivery guarantees. Can be null if no specific options are required.
See also
Throws
If the transport is not operational or other application-specific errors occur.
If the coroutine is canceled.