TCP Server sends to multiple clients

Daniel

Distinguished
Mar 30, 2004
544
0
18,980
Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)

Hi there,

I have one TCP Server and n clients. I want to send small command
packages to the clients simultaneously. I have no multicast. I opened
n sockets and sended the small data packets serialized to the clients.
This is fast enough, but has the disadvantage, that one lost client
blocks the system. There are 3 possibilities to solve the questions,
but I don't not really know the consequences of my doing.

1) Call each send in a distinct thread. Because the commands are
small, it should be convenient to aggregate the data to avoid extreme
thread context switching

2) Simply set the IO/option FIONBIO with ioctlsocket. But I dont know
whats happening in the OS beyond the scene now. I fear that bad
versions of plan a) will be created internally.

3) Use UDP broadcast. Implement secure acknowing od packets. That is
very difficult, definitely not trivial, but its done in a product
called AmirusMM
www.citruscontrols.com. This is very interesting and seems reasonable,
but I fear Convoi Phenomena, that the retransmission on one bad line
logically slows down the system.

Has anyone experience with this kind of problems ? It's high
performant and must be absolute stable over days of execution.

Thank You for your opinions, I think, this is a intere´sting question

Daniel

dmoses@***NOSPAM***hilf.***NOSPAM***.de
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.protocol.tcpip (More info?)

Depending on the number of clients, you either have to use one thread per
client, or use IOCP, or use select (WSAEventSelect) model.

"daniel" <dmoses@hilf.de> wrote in message
news:2c082b6f.0404070129.51de25cd@posting.google.com...
> Hi there,
>
> I have one TCP Server and n clients. I want to send small command
> packages to the clients simultaneously. I have no multicast. I opened
> n sockets and sended the small data packets serialized to the clients.
> This is fast enough, but has the disadvantage, that one lost client
> blocks the system. There are 3 possibilities to solve the questions,
> but I don't not really know the consequences of my doing.
>
> 1) Call each send in a distinct thread. Because the commands are
> small, it should be convenient to aggregate the data to avoid extreme
> thread context switching
>
> 2) Simply set the IO/option FIONBIO with ioctlsocket. But I dont know
> whats happening in the OS beyond the scene now. I fear that bad
> versions of plan a) will be created internally.
>
> 3) Use UDP broadcast. Implement secure acknowing od packets. That is
> very difficult, definitely not trivial, but its done in a product
> called AmirusMM
> www.citruscontrols.com. This is very interesting and seems reasonable,
> but I fear Convoi Phenomena, that the retransmission on one bad line
> logically slows down the system.
>
> Has anyone experience with this kind of problems ? It's high
> performant and must be absolute stable over days of execution.
>
> Thank You for your opinions, I think, this is a intere´sting question
>
> Daniel
>
> dmoses@***NOSPAM***hilf.***NOSPAM***.de