BS2000/SOCKETS/asynchron connect

All topics related to Server Products
lzsiga

BS2000/SOCKETS/asynchron connect

Postby lzsiga » Wed Mar 17, 2004 13:02

It seems to me that SOCKETs implementation in BS2000 reports unsuccessfull asynchron connect incorrectly.<BR>In UNIX, when the connection request fails the socket becomes writeable, and getsockopt (SO_ERROR) returns ECONNREFUSED.<BR>In BS2000, the socket becomes both writeable and readable, and getsockopt(SO_ERROR) returns no error! The following read/write will fail, which suggests the user that the connection build up and then destroyed, which is not true.<BR>

lzsiga

Re: BS2000/SOCKETS/asynchron connect

Postby lzsiga » Mon Mar 22, 2004 10:17

Here is the example code <A HREF="http://web.axelero.hu/lzsiga/conntest.c.txt" TARGET=_blank>http://web.axelero.hu/lzsiga/conntest.c.txt</A> <BR>The result in BS2000:<BR>connect: Connection refused<BR>Non-blocking connect returned EWOULDBLOCK<BR>select returned 2<BR>select: sock#0 readable<BR>select: sock#0 writeable<BR><I>No error with socket#0</I><P>The result in UNIX:<BR>connect: Connection refused<BR>Non-blocking connect returned EWOULDBLOCK<BR>select returned 2<BR>select: sock#0 readable<BR>select: sock#0 writeable<BR><I>Error 111 on socket#3</I><BR>connect: Connection refused<BR>


Return to “Server Products (archive)”

Who is online

Users browsing this forum: No registered users and 1 guest