convertAndSend

suspend fun <T : Any> StompSessionWithKxSerialization.convertAndSend(destination: String, body: T? = null, serializer: SerializationStrategy<T>): StompReceipt?(source)

Sends a SEND frame to the given destination with the given body, converted appropriately using the provided serializer.

Return

null (immediately) if auto-receipt is disabled and no receipt header is provided. Otherwise, this method suspends until the relevant RECEIPT frame is received from the server, and then returns a StompReceipt.


inline suspend fun <T : Any> StompSessionWithKxSerialization.convertAndSend(headers: StompSendHeaders, body: T? = null): StompReceipt?(source)

Sends a SEND frame to the server with the given headers and the given body, converted appropriately.

This overload uses reflection to find the relevant deserializer for T. This has limited support in JavaScript and may break on generic types.

Return

null (immediately) if auto-receipt is disabled and no receipt header is provided. Otherwise, this method suspends until the relevant RECEIPT frame is received from the server, and then returns a StompReceipt.


inline suspend fun <T : Any> StompSessionWithKxSerialization.convertAndSend(destination: String, body: T? = null): StompReceipt?(source)

Sends a SEND frame to the given destination with the given body, converted appropriately.

This overload uses reflection to find the relevant deserializer for T. This has limited support in JavaScript and may break on generic types.

Return

null (immediately) if auto-receipt is disabled and no receipt header is provided. Otherwise, this method suspends until the relevant RECEIPT frame is received from the server, and then returns a StompReceipt.