vapor-community / sockets

🔌 Non-blocking TCP socket layer, with event-driven server and client.
MIT License
575 stars 54 forks source link

Add timeout to send/recv #48

Closed tanner0101 closed 8 years ago

tanner0101 commented 8 years ago

Socks should expose a way to configure the SO_RCVTIMEO and SO_SNDTIMEO.

This will allow us to conform to the C7 spec:

public func send(_ data: Data, timingOut deadline: Double) throws

And it will help frameworks using Socks to avoid memory leaks from dead connections that never close.

czechboy0 commented 8 years ago

Related to #30.

Agreed, I'll investigate and report back.

Notes: http://linux.die.net/man/7/socket