/** * Gets the size of the largest application buffer that may occur when * using this session. * SSLEngine application data buffers must be large enough to hold the * application data from any inbound network application data packet * received. Typically, outbound application data buffers can be of any size. * * (javadoc is taken from SSLSession.getApplicationBufferSize()) * @return largets application buffer size, which may occur */ public int getApplicationBufferSize() { initSSLEngineIfRequired(); return sslEngine.getSession().getApplicationBufferSize(); }
/** * Finish handling the OP_CONNECT interest ops. * @param key - a {@link SelectionKey} */ public void finishConnect(SelectionKey key) throws IOException{ try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Finish connect"); } socketChannel = (SocketChannel) key.channel(); socketChannel.finishConnect(); isConnected = socketChannel.isConnected(); if (isConnected) { initSSLEngineIfRequired(); } } catch (IOException e) { throw e; } finally { isConnectedLatch.countDown(); } }