rust-lang / socket2

Advanced configuration options for sockets.
https://docs.rs/socket2
Apache License 2.0
683 stars 227 forks source link

How to read EventExtra from the event? #490

Closed irvingoujAtDevolution closed 9 months ago

irvingoujAtDevolution commented 9 months ago

when creating TCP connection, sometimes there's no tcp server listening at the other end, then the event will be

event=Event { key: 1, readable: true, writable: true, extra: EventExtra { flags: CONNECT_FAIL } }

when polled

How do I read this extra field of the event to know that it has failed.

Thomasdezeeuw commented 9 months ago

What event are you talking about? Socket2 doesn't provide any polling.

irvingoujAtDevolution commented 9 months ago

sorry, wrong repository