[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sockets question



Hi Brian,

> Scott, If I follow the article correctly it looks like your nbrecv()
> function does a recv() first and then uses select() to wait for more
> info and the possible time out. The problem I have is that the recv()
> never ends.

Yes, I understand your situation.  I've also understood it the other 
99999999999999999999999999999999999999 times that people have asked me 
the exact same thing.  Do you really believe that you're the only one on 
the planet who's ever asked this question or had this problem?

You're missing several things:

a) The nbrecv() procedure is intended to be used on a NON-BLOCKING 
socket.  Therefore it'll never, ever, ever, get hung up on the recv() call.

The "nb" at the start of the procedure call stands for "non-blocking". 
It's intended that you create your socket by calling the nbsocket() 
procedure in the same service program, which will put the socket into
non-blocking mode for you.  READ THE ARTICLE.

b) The nbrecv() procedure was one of two alternatives that are discussed 
in that article.  If you don't like it -- use the other alternative.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------