jgoz / crossroads-net

Crossroads I/O bindings for .NET and Mono
www.crossroads.io
Other
14 stars 2 forks source link

Change error handling for connect/bind #1

Closed sustrik closed 12 years ago

sustrik commented 12 years ago

Would it be possible to check the error codes from xs_connect/xs_bind in the following way:

negative number means error 0 or greater means success

If this change is implemented, I can safely commit the "partial socket shutdown" patch to libxs.

Martin

jgoz commented 12 years ago

Yes, that's definitely possible. I'll take care of that in a few hours.

jgoz commented 12 years ago

Actually, after reviewing your patch, it looks like I won't have to make any changes. I check return codes explicitly for inequality with -1, which treats non-negative results from any xs methods as successful.

sustrik commented 12 years ago

Great! Thanks for checking that out.