send
Queues the given payload for sending to getCounterparty and continues without suspending.
Note that the other party may receive the message at some arbitrary later point or not at all: if getCounterparty is offline then message delivery will be retried until it comes back or until the message is older than the network's event horizon time.
The payload object should be of a type that is annotated with @CordaSerializable or a primitive type. This function cannot handle types that do not meet these criteria.
Parameters
payload
The data sent to the counterparty, which should be either a primitive type or a type annotated with @CordaSerializable.
Throws
Corda Runtime Exception
if the session is closed or in a failed state.