lemunozm / message-io

Fast and easy-to-use event-driven network library.
Apache License 2.0
1.12k stars 75 forks source link

Configurable network adapters #141

Closed kgraefe closed 1 year ago

kgraefe commented 1 year ago

Relates to #54

kgraefe commented 1 year ago

CI fails on building a dependency with error: internal compiler error :-\

kgraefe commented 1 year ago

CI issue will be resolved with the next nightly (tomorrow?), see https://github.com/rust-lang/rust/issues/109199

kgraefe commented 1 year ago

I wanted to hear your opinion before putting too much effort into it. :-) will work on the details tomorrow.

lemunozm commented 1 year ago

Great! 💯

kgraefe commented 1 year ago

Should I expect another PR with the broadcast implementation?

The implementation is complete. It's actually just socket.set_broadcast(true)? for both connect() and listen(). I included it in this PR so you can see how passing the parameters works.

kgraefe commented 1 year ago

I think I addressed all your comments.

I also wrapped the configuration properties in an Option so that we can distinguish the default case from explicitly setting it to false. It doesn't make too much sense for that particular property as the default of bool is false and that's also the default for the sockets broadcast capability. But I think we should establish that as a pattern for all configuration properties.

kgraefe commented 1 year ago

sorry, forgot about Option