Yes i  am running an application with a static block as shown below

static{
        connector = new NioSocketConnector();
                connector.getFilterChain().addLast("codec",new 
ProtocolCodecFilter(new
TextLineCodecFactory(Charset.forName("UTF-8"))));
                connector.setHandler(new MinaClientHandler_executor("hello 
server"));
connector.getSessionConfig().setReadBufferSize(1024);
        
        }

then i opened the concurrent connections as shown below.


        for(int i=initialPort;i<(initialPort+numberofports);i++)
                {
                        final int portNumber=i;

try {

                 ConnectFuture future = connector.connect(new
InetSocketAddress(serverIP,serverPort));

                                 future.awaitUninterruptibly();

                                 if (!future.isConnected())
                                 {
                         throw new Exception("port is already in
use"+future.getException()+">>>>>>>>>>>>");
                                 }
                                 IoSession session = future.getSession();
}catch(Exception e)
{
e.printStackTrace();
}

the MinaClientHandler_executor will send a command to the device and
download the data.But at any instant. But when i run the above program with
1000 connection,concurrently only 36 files are getting downloaded.

Do i need to make any changes to the above code.







--
View this message in context: 
http://apache-mina.10907.n7.nabble.com/NIO-Client-Sockets-tp40029p40031.html
Sent from the Apache MINA Developer Forum mailing list archive at Nabble.com.

Reply via email to