Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Sockets limits....

www.cryer.info
Managed Newsgroup Archive

Re: Sockets limits....

Subject:Re: Sockets limits....
Posted by:"Martin James" (mjames_falc..@dial.pipex.com)
Date:Fri, 5 May 2006 04:51:39

>
> Yes, I'll have 10000 servers and it will work like proxy. I dont have
expirence with IOCP and I´m going to study it to try solve my problem.
>

Well, if you are merely sucking in data from a client on one server socket
and shovelling it out to another client connected to the other socket, ie.
you are not processing the data between the two clients, just relaying it,
you may not need IOCP, merely overlapped I/O.  IOCP queues are very slow,
and only justify their existence by allowing a 'cap' to be placed on the
number of protocol-handler threads that are allowed to be in the running
state, (so economising on context-changes).  Since you have, essentially, no
protocol, buffer arrays received with WSARecv can probably be immediately
sent out with WSASend in the WSARecv completion routine. You can probably
get away with overlapped I/O and just two threads.

Just to be sure of the requirement.  You have up to 5000 groups of server
socket pairs.  In each group of 2, one client connects to each server
socket.  The data originated in one of the clients is sent to the server
socket and relayed to the other client that is connected to the other server
socket in the group.

What defines a 'group'?  When a client connects to the server, how does the
server know which other client is in the group?

Rgds,
Martin

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive