private Channel getChannel(SSHPacket buffer) throws ConnectionException { try { final int recipient = buffer.readUInt32AsInt(); final Channel channel = get(recipient); if (channel != null) return channel; else { buffer.rpos(buffer.rpos() - 5); throw new ConnectionException(DisconnectReason.PROTOCOL_ERROR, "Received " + buffer.readMessageID() + " on unknown channel #" + recipient); } } catch (Buffer.BufferException be) { throw new ConnectionException(be); } }
log.trace("Received packet #{}: {}", seq, plain.printHex()); packetHandler.handle(plain.readMessageID(), plain); // Process the decoded packet inputBuffer.clear(); packetLength = -1;
log.trace("Received packet #{}: {}", seq, plain.printHex()); packetHandler.handle(plain.readMessageID(), plain); // Process the decoded packet inputBuffer.clear(); packetLength = -1;
private Channel getChannel(SSHPacket buffer) throws ConnectionException { try { final int recipient = buffer.readUInt32AsInt(); final Channel channel = get(recipient); if (channel != null) return channel; else { buffer.rpos(buffer.rpos() - 5); throw new ConnectionException(DisconnectReason.PROTOCOL_ERROR, "Received " + buffer.readMessageID() + " on unknown channel #" + recipient); } } catch (Buffer.BufferException be) { throw new ConnectionException(be); } }
private Channel getChannel(SSHPacket buffer) throws ConnectionException { try { final int recipient = buffer.readUInt32AsInt(); final Channel channel = get(recipient); if (channel != null) return channel; else { buffer.rpos(buffer.rpos() - 5); throw new ConnectionException(DisconnectReason.PROTOCOL_ERROR, "Received " + buffer.readMessageID() + " on unknown channel #" + recipient); } } catch (Buffer.BufferException be) { throw new ConnectionException(be); } }
log.trace("Received packet #{}: {}", seq, plain.printHex()); packetHandler.handle(plain.readMessageID(), plain); // Process the decoded packet inputBuffer.clear(); packetLength = -1;
log.trace("Received packet #{}: {}", seq, plain.printHex()); packetHandler.handle(plain.readMessageID(), plain); // Process the decoded packet inputBuffer.clear(); packetLength = -1;
log.trace("Received packet #{}: {}", seq, plain.printHex()); packetHandler.handle(plain.readMessageID(), plain); // Process the decoded packet