Checking of errors from xs_bind/xs_connect
sustrik opened this issue · comments
Can the code be modified in such a way as to treat any negative number returned from xs_bind/xs_connect as an error and zero or any positive number as success?
Making this change would allow me to commit recent 'partial socket shutdown' patch to libxs safely.
Thanks!
On the face of it I don't see why not. I'll take a look at it this weekend.
Cheers
Hi Martin, I didn't have to change much. Error checking should now work OK with your proposed changes. Are there any tests that you need to run before I can close this issue?
Thanks! If you want to test it, just grab the trunk version of libxs and check whether connect/bind works OK. xs_bind() and xs_connect() should return positive number and ffi-rxs should not fail because of that.
Tested against trunk libxs and all tests passing.
thanks!