| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public int read(ByteBuffer clearBuffer) throws IOException { |
| | | public synchronized int read(ByteBuffer clearBuffer) throws IOException { |
| | | SSLEngineResult.HandshakeStatus hsStatus; |
| | | if(!reading) |
| | | appNetData.clear(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void close() throws IOException { |
| | | public synchronized void close() throws IOException { |
| | | sslEngine.closeInbound(); |
| | | sslEngine.closeOutbound(); |
| | | SSLEngineResult.HandshakeStatus hsStatus = |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public int write(ByteBuffer clearData) throws IOException { |
| | | public synchronized int write(ByteBuffer clearData) throws IOException { |
| | | if(!socketChannel.isOpen() || sslEngine.isOutboundDone()) { |
| | | throw new ClosedChannelException(); |
| | | } |