How to concurrently receive and send data via WebSocketConn? How to process message frames? #201
-
|
Hello. I'm probably missing something, but I'm wondering if there is a way to receive and send data frame by frame? It seems that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
You can use For non-message-based websockets, it sounds like you might need a different websocket adapter than the one provided by trillium-websockets, or alternatively, a way to drop down to async-tungstenite. Does |
Beta Was this translation helpful? Give feedback.
You can use
WebSocketConn::take_inbound_streamto concurrently send and receive messages.For non-message-based websockets, it sounds like you might need a different websocket adapter than the one provided by trillium-websockets, or alternatively, a way to drop down to async-tungstenite. Does
async_tungstenite::WebSocketStreamprovide the affordances you need? It should be possible to provide aimpl TryFrom<WebSocketConn> for WebSocketStream