hi

i am building a server app to server multiple clients with udp data streams,

i have no controll over the client code / implementations and i would
like to do the following

register multiple clients with the server
during registration the clients and server negotiate the udp send/recieve ports
the server then need to send a stream of udp packets to the clients


i can do the following
static IoSession udpIoSession
static List<InetAddress> clientRecievePorts ; // this gets updated by
the registration protocoll



transmitPacket( byte[] data) {
packet =  // create datagram packet;
for( InetAddress port: clientRecievePorts )
 {
   packet.setDestination( port )
   udpIoSession.send( packet )

 }

}

the problem is when  i touch 1000 connections just the execution of
this loop will start taking a huge time


is there a parrellization example / implementation that i can use a reference



thanks

Reply via email to