Skip to content

How to concurrently receive and send data via WebSocketConn? How to process message frames? #201

Answered by jbr
quixoticaxis asked this question in Q&A
Discussion options

You must be logged in to vote

You can use WebSocketConn::take_inbound_stream to 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::WebSocketStream provide the affordances you need? It should be possible to provide a impl TryFrom<WebSocketConn> for WebSocketStream

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@jbr
Comment options

@quixoticaxis
Comment options

@jbr
Comment options

@jbr
Comment options

@quixoticaxis
Comment options

Answer selected by quixoticaxis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants