Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send and Recv support #13

Open
vimalloc opened this issue May 22, 2016 · 0 comments
Open

Send and Recv support #13

vimalloc opened this issue May 22, 2016 · 0 comments

Comments

@vimalloc
Copy link
Owner

We need to be able to send and receive data on the socket concurrently (or similar to that with a non-blocking or asynchronous approach). This is so that we can send pings every so often to check the state of the socket, and so that other people using this as a library could send commands without having to wait for a recv call to happen first (ex, sending a message to a buffer).

Originally, I was planning to simply use try_clone on the socket, and setup 1 thread for receiving and 1 thread for sending. However, apparently this doesn't working ok SSL sockets (see sfackler/rust-openssl#338 and http://stackoverflow.com/questions/14467630). With that out of the question, I think using a non-blocking socket to do both the sends and receives is probably the best way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant