aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
528 stars 97 forks source link

Creating a connection from Read+Write #162

Open kpcyrd opened 5 years ago

kpcyrd commented 5 years ago

hello!

I'm wondering if it would be possible to extend the client to accept a generic object that implements Read+Write. Specifically I'm interested in creating the connection myself and handing it over to the irc crate.

That would also allow setting the tokio-tls and native-tls dependencies to optional to avoid linking to openssl.

aatxe commented 5 years ago

Hi!

Thanks for the suggestion. In principle, this should be possible, but I suspect that it would be a rather substantial (probably breaking) change. If you'd like to investigate it yourself, I'd be happy to offer support, feedback, and so forth along the way. If it can be done in a way that doesn't make the common case (i.e. using the library-provided connections) worse, I'd be happy to include it as part of the irc crate.