ratchet icon indicating copy to clipboard operation
ratchet copied to clipboard

How to use mio with ratchet ?

Open beanqi opened this issue 6 months ago • 0 comments

I'm currently exploring the possibility of integrating ratchet with mio directly, as I'm working in an environment where I'd prefer to avoid pulling in tokio as a dependency.

I was wondering if you could provide some guidance or point me in the right direction on how one might approach this. Specifically, I'm trying to understand:

  • Connection Establishment: What would be the general approach to establish a WebSocket(with tls) connection using ratchet when the underlying I/O is managed by mio?
  • Splitting Reader/Writer: Once a connection is established, how could I effectively split the stream into a reader and a writer half that can be independently managed within a mio-based event loop? Are there any existing examples, or perhaps could you outline the general steps or challenges involved in such an integration? Any pointers or high-level ideas would be greatly appreciated.

beanqi avatar Jun 04 '25 07:06 beanqi