@ Override public void sessionOpened ( IoSession session ) { // Set timeouts session . getConfig ( ) . setWriteTimeout ( writeTimeout ) ; session . getConfig ( ) . setIdleTime ( IdleStatus . READER_IDLE , readTimeout ) ; // Create streams InputStream in = new IoSessionInputStream ( ) ; OutputStream out = new IoSessionOutputStream ( session ) ; session . setAttribute ( KEY_IN , in ) ; session . setAttribute ( KEY_OUT , out ) ; processStreamIo ( session , in , out ) ; }
Initializes streams and timeout settings .