Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Sockets limits....
| Subject: | Re: Sockets limits.... |
| Posted by: | "Carlos Franciscatto" (cfranciscat..@gmail.com) |
| Date: | 5 May 2006 18:09:48 |
Hi!!
>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.
Right...
>What defines a 'group'?
A set of 2 servers sockets. Only a name that I used to represent the pair.
Servers accept only 1 client.
>When a client connects to the server?
At server_2, client is always connected (the client is a meter hardware).
At server_1, when a specific application needs to get data from the meter (server_2 client).
>how does the server know which other client is in the group?
I will configure the pairs. When server_1's port is 10000, server_2 is 10001 ie.
Rgds.
Carlos
"Martin James" <mjames_falcon@dial.pipex.com> wrote:
>>
>> 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
none