non-blocking connect in C?

I understand how to operate non-blocking send and recv in C, so
as to exchange data with multiple connections without blocking with
every function call. My question is, how to set up a non-blocking
call to the connect function, so that it will just run the call and
immediately go on with whatever line is next in the code (even though
it might not have had time to finish establishing a connection), and
then the socket can somehow (how?) be checked later to see when/if the
connection finishes being established. This would probably involve
polling with the select function, I assume? Thanks very much in
advance! (I use GCC on a win XP machine) And P.S., this is not homework

Advertisements

On 11 Jul 2003 00:56:56 -0700, in comp.lang.c ,
(Trishia Rose) wrote:
>Hi,
>
> I understand how to operate non-blocking send and recv in C, so
>as to exchange data with multiple connections without blocking with
>every function call. My question is, how to set up a non-blocking
>call to the connect function,

unfortunately connect(), recv() and send() are not part of C.

You need to ask this question in a unix programming group, since
networking is typically topical there (don't worry that you're using
XP, the TCP/IP networking is essentially common).

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!