2013/4/26 Ludo Brands <ludo.bra...@free.fr> > On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: > > On Thu, 25 Apr 2013, silvioprog wrote: > > > >> I do not know where it would be used, it's just an observation hehe... > > > > Yes, but the above is what I mean with 'it does not make much sense'. > > > > I can easily add this - in fact I will do so, but with multiple sockets > > it is better to combine the waitfordata() > > > > In blocking mode the select is vital if you want to do simultaneous read > and write on the same socket in the same thread. Otherwise you are > simply blocking the thread in a recv when nothing comes in or in a send > when the socket buffer is not empty. Note that select also returns when > an exception occurs. > > Ludo
Exactly. In my small sample, when no buffer is received from server, the process stays blocked on: https://bitbucket.org/silvioprog/tcpipcomp/src/f42be14db1e74d750fa88d6b4554b209145ff589/src/tcpipclient.pas?at=master#cl-189 -- Silvio Clécio My public projects - github.com/silvioprog
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal