ASPLes / nopoll

OpenSource WebSocket toolkit
http://www.aspl.es/nopoll
GNU Lesser General Public License v2.1
126 stars 73 forks source link

Add binding interface option to connection. #1

Closed schmidtw closed 8 years ago

schmidtw commented 8 years ago

I wasn't able to put together a test that I'm happy with & will run everywhere. Thoughts?

francisbrosnan commented 8 years ago

Hi Weston,

Thnaks for the patch. Looks interesting and very clear. The only issue I see is that the function nopoll_conn_sock_connect is public and the patch updates it (by adding a new parameter).

The solution is to make that function to be nopoll_conn_sock_connect_opts (that is adding at the end "_opts") and at the same time, make nopoll_conn_sock_connect to exists with the current prototype but just as a wrapper to this function (_opts) by passing NULL as the last argument.

That way the API is kept and the new option is supported.

schmidtw commented 8 years ago

Good catch - I missed that the function was public. I uploaded & squashed the fix into this pull request.

francisbrosnan commented 8 years ago

Hi Weston,

Looks good. I'm going to merge it and look for a moment to integrate a regression test.

Thanks for the patch!