[omniORB] question about blocking socket mode in omniORB-4.1.1

Duncan Grisby duncan at grisby.org
Fri Mar 13 14:00:37 GMT 2009


On Tuesday 3 March, Nikola Radovanovic wrote:

> in method giopActiveConnection* tcpAddress::Connect(unsigned long
> deadline_secs, unsigned long deadline_nanosecs, CORBA::ULong
> strand_flags) const (in tcpAddress.cc:299);
> after connection is successfully established, connected socket is set
> to blocking mode by following piece of code:
>     if (SocketSetblocking(sock) == RC_INVALID_SOCKET) {
>        CLOSESOCKET(sock);
>        return 0;
>    }
> 
> Why is this done when select() is used in
> int tcpConnection::Recv(void* buf, size_t sz, unsigned long
> deadline_secs, unsigned long deadline_nanosecs)        -    in
> tcpConnection.cc:283
> int tcpConnection::Send(void* buf, size_t sz, unsigned long
> deadline_secs, unsigned long deadline_nanosecs)        -    in
> tcpConnection.cc:351

It's done because select() / poll() are not always used in Send() and
Recv(). If there is no call timeout specified, the underlying send() /
recv() calls are allowed to block.

Is it causing you a problem?

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list