This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: select() implementation question




> -----Original Message-----
> From: cygwin-owner@sourceware.cygnus.com
> [mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Chris Faylor
> Sent: Monday, June 19, 2000 8:34 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: select() implementation question
>
>
> select() on a socket uses the winsock version of select it does not
> establish connections, AFAIK.
> [...]

I've written a small C program: It initializes a struct sockaddr_in, calls
socket(), bind(), listen() and saves the socket in a fd_set. Now there is
exact one listening port. Then select() is called (and the fd_set is passed
to select()). A second random port is opened for listening. When select()
returns "something" connects to this second random port and a connection is
established. After that this listening port is closed but the connection
remains.

I have no problems to use "my" listening port - everything works well. I
just noticed that there are some additional unusual things happening so I
want to make sure that this is cygwin and not a bug in my application. Can
anyone confirm this behaviour of network applications under cygwin? If you
like I can send you the C source code: one file, 50 lines, nothing special.
It would be nice to know that this is select()'s standard behaviour then I
could happily go on coding.

Boris


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]