Code example for SSLEngine

Methods: getSession

0
    		} 
    	} 
    } 
     
    private void createBuffers(SSLEngine engine) {
    	SSLSession session = engine.getSession();
    	this.myAppData = ByteBuffer.allocate(session.getApplicationBufferSize());
    	this.peerAppData = ByteBuffer.allocate(session.getApplicationBufferSize());
    	this.myNetData = ByteBuffer.allocate(session.getPacketBufferSize());
    	this.peerNetData = ByteBuffer.allocate(session.getPacketBufferSize());
    } 
 
	@Override 
	public void stop() throws IOException { 
		this.sslEngine = null;
		this.sslEngineResult = null;
		this.myAppData = null;
		this.myNetData = null;
		this.peerAppData = null;
		this.peerNetData = null;