comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » sockets: IDL client, C++ server
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
sockets: IDL client, C++ server [message #41168] Mon, 27 September 2004 16:05
hanswurst247 is currently offline  hanswurst247
Messages: 2
Registered: September 2004
Junior Member
Hi

I have written a C++ server and an IDL client, that are supposed to
communicate over sockets. Circumstances require, that only one client
can connect at a time, and possible others are refused.

So the first thing I did, was to set a short connection timeout on the
client side:

socket, lun, port, connect_timeout=1

This was only partially successful, because the server can queue a
number of clients, that are basically in a waiting loop. The number of
clients, that are queued by the server is specified in the listen()
function of <winsock2.h>:

listen(SOCKET s,int backlog)

So if I set backlog=1, I can connect with one client, another one is
queued and a third one is refused. The 3rd IDL client actually returns
after the specified 1sec realizing he couldn't connect. So far so
good.

The strange behavior starts now: even if I set backlog=0 on the C++
side, the server seems to queue one (not more) client, while servicing
another.

Now my question: is there any way on the IDL side, to make the client
realize he is only in a queue and abort?

If not, is there maybe a solution on the C++ side?

Thanks,
Holger
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: SHMMAP
Next Topic: IDL 6.1 for SGI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:00:51 PDT 2025

Total time taken to generate the page: 0.00492 seconds