258259260261262263264265266267
return socket.getSocket(); } public void close() throws IOException { socket.configureBlocking(true); currentOutBuffer = new Terminate().toBytes(); socket.write(currentOutBuffer); socket.close(); state = ConnectionState.Closed; }