Re: non-blocking socket connection

Fons Rademakers ((no email))
Tue, 29 Apr 1997 22:34:32 +0200 (METDST)


Hi Patrick,

this is an ommission and I'll fix it. Thanks for pointing it out.
I'll let you know when it is implemented.

Cheers, Fons.

>
> hi,
>
> i need to implement a non-blocking socket connection on a TServerSocket. i
> set this up using SetOption(kNoBlock, 1). everything works fine, however i
> get the following error messages when there is no client socket connected:
>
> SysError in <TUnixSystem::AcceptConnection>: accept (Resource temporarily
> unavailable)
> SysError in <TUnixSystem::GetPeerName>: getpeername (Bad file number)
>
> looking at the source code, i see that in TUnixSystem::AcceptConnection(),
> which is called by TServerSocket::Accept() there is no check on the
> EWOULDBLOCK error code which will presumably be set for non-blocking
> sockets. i was wondering if i am trying to implement something in a
> roundabout way or if this was an ommission?
>
> thanks,
> patrick.
>
>
>

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910