eio
eio copied to clipboard
(draft) Eio.Net.connect: optionally bind before connect
I'm looking to port some existing code which does a bind before connect and couldn't find a way to do it with Eio. I wasn't familiar with this trick, but it's apparently useful when you have multiple public IPs and need to control which one will be seen by the server.
Let me know if there's a better way to do this!.. I'm marking this PR as a draft because I'm starting to think this might actually require a new bind_connect
function, to also expose the REUSEADDR/PORT
options as they only make sense when ?bind
is set.