@Override public int getLength() { byte[] bytes = getBytes(); return (bytes != null) ? bytes.length : 0; }
@Override public int getLength() { return getBytes().length; }
@Override public void onCommand(Session session, CommandMessage message) throws CloseSessionException { logger.info("SESSION[{}] request:{} {}:{}", session.getId(), message.getCommand(), message.getAddressType() != AddressType.DOMAIN_NAME ? message.getInetAddress() : message.getHost(), message.getPort()); }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
/** * Returns a {@link SocksException} instance with a message of reply. * * @param reply Server's reply. * @return An instance of {@link SocksException}. */ public static SocksException serverReplyException(ServerReply reply) { SocksException ex = serverReplyException(reply.getValue()); ex.setServerReply(reply); return ex; }
@Override public void write(WritableMessage message) throws SocksException, IOException { write(message.getBytes()); }
@Override public SocksMethod select(MethodSelectionMessage message) { int[] methods = message.getMethods(); for (int i = 0; i < methods.length; i++) { for (SocksMethod method : supportMethods) { if (method.getByte() == methods[i]) { return method; } } } return new NoAcceptableMethod(); }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
@Override public int getLength() { return getBytes().length; }
/** * Returns a {@link SocksException} instance with a message of reply. * * @param reply Server's reply. * @return An instance of {@link SocksException}. */ public static SocksException serverReplyException(ServerReply reply) { SocksException ex = serverReplyException(reply.getValue()); ex.setServerReply(reply); return ex; }
@Override public void write(WritableMessage message) throws SocksException, IOException { write(message.getBytes()); }