Skip to content

Send and Recv support #13

Description

@vimalloc

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 rust-openssl/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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions