On 9/18/10 6:00 PM, Charles Hudak wrote:
I'm using MINA 1.1.7 on android (2.2 emulator) to connect to my MINA server implementation.My client runner looks like this: public void init() { connector = new SocketConnector(); connectorConfig = new SocketConnectorConfig(); connectorConfig.setConnectTimeout(SOCKET_CONNECT_TIMEOUT_IN_SECONDS); connector.setWorkerTimeout(WORKER_THREAD_TIMEOUT_IN_SECONDS); connectorConfig.getFilterChain().addLast("codec", new ProtocolCodecFilter(getCodecFactory())); } public void run() { try { LOG.info("connecting to gateway host={}, port{}", host, port); ConnectFuture connectFuture = connector.connect( new InetSocketAddress(host, port), clientSessionHandler, connectorConfig); connectFuture.join(CONNECT_JOIN_TIMEOUT_IN_MS); IoSession session = connectFuture.getSession(); LOG.debug("Connected: {}", session.getLocalAddress()); CloseFuture closeFuture = session.getCloseFuture(); closeFuture.join(); LOG.debug("Session complete: {}", session.getLocalAddress()); } catch (Exception e) { LOG.error("unable to initiate session", e); } finally { } } The client is run using a ScheduledExecutorService and runs every minute to connect to the server and do a message exchange. After running for some period of time I get this:
Do you ever close the sessions you are opening ? How many of them are you opening ?
-- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
