[fpc-pascal]Nonblocking socket - end of socket

Georgi Georgiev skelet_bg at yahoo.com
Tue Sep 16 15:18:48 CEST 2003


 --- Michael Van Canneyt <michael.vancanneyt at wisa.be>
wrote: > 
> 
> On Tue, 16 Sep 2003, [iso-8859-2] Balázs Csaba
> wrote:
> 
> > I use non-blocking socket (after initialization i
> used the fcntl function).
> > Accept does not waiting for client connection, so
> i need not use threads, I
> > can make it in the main thread.
> > How can I be alerted when the client socket closed
> from the client side?
> 
> Using select() you can see this, normally.

There is another way, if you use file descriptor calls
for non-blocked socket:

...
count:=fdRead(socket,data,size);
socket_eof:=(count=0) and (LinuxError=0);
...




=====
Skelet
====== http://skelet.hit.bg

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk




More information about the fpc-pascal mailing list