Skip to content

in chat example, how to reuse sender as it is moved #610

Answered by davidpdrsn
yatesco asked this question in Q&A
Discussion options

You must be logged in to vote

I think I would make an mpsc channel and spawn a task to forward messages from the mpsc receiver to the socket sender. The mpsc sender can be cloned.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@yatesco
Comment options

@davidpdrsn
Comment options

Answer selected by yatesco
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