@Override protected void sendNonWebSocketMessage(byte[] msg, boolean isClient) throws IOException { if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { logger.logDebug("sendMessage isClient = " + isClient + " this = " + this); } lastActivityTimeStamp = System.currentTimeMillis(); NIOHandler nioHandler = ((NioTcpMessageProcessor) messageProcessor).nioHandler; if (this.socketChannel != null && this.socketChannel.isConnected() && this.socketChannel.isOpen()) { nioHandler.putSocket(NIOHandler.makeKey(this.peerAddress, this.peerPort), this.socketChannel); } sendMessage(msg, this.peerAddress, this.peerPort, isClient); }
public void sendEncryptedData(byte[] msg) throws IOException { // bypass the encryption for already encrypted data or TLS metadata if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { logger.logDebug( "sendEncryptedData " + " this = " + this + " peerPort = " + peerPort + " addr = " + peerAddress); } lastActivityTimeStamp = System.currentTimeMillis(); NIOHandler nioHandler = ((NioTcpMessageProcessor) messageProcessor).nioHandler; if (this.socketChannel != null && this.socketChannel.isConnected() && this.socketChannel.isOpen()) { nioHandler.putSocket(NIOHandler.makeKey(this.peerAddress, this.peerPort), this.socketChannel); } super.sendNonWebSocketMessage(msg, false); // super.sendMessage(msg, this.peerAddress, this.peerPort, true); }