Le 10/7/13 2:56 PM, kishore a écrit :
> 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);
>       
>       }

If you are to read 1 or 2 Mb, this is trully too small. You will require
a hell lot of roundtrip to get all the data. Use a bigger buffer.
>
> 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.

Again, and this is not the first time we told you to do so, chekc your
system configuration.

Your problem has nothing to do with teh way MINA works or the way you
use it.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to