Codota Logo
Session.getClientAddress
Code IndexAdd Codota to your IDE (free)

How to use
getClientAddress
method
in
sockslib.server.Session

Best Java code snippets using sockslib.server.Session.getClientAddress (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: theotherp/nzbhydra2

/**
 * This method will throw a {@link AuthenticationException}
 *
 * @param session Current session
 * @throws AuthenticationException {@link AuthenticationException}
 */
protected void authenticationFailed(Session session) throws AuthenticationException {
  throw new AuthenticationException(
      "Authentication failed, client from " + session.getClientAddress());
}
origin: fengyouchao/sockslib

/**
 * This method will throw a {@link AuthenticationException}
 *
 * @param session Current session
 * @throws AuthenticationException {@link AuthenticationException}
 */
protected void authenticationFailed(Session session) throws AuthenticationException {
 throw new AuthenticationException(
   "Authentication failed, client from " + session.getClientAddress());
}
origin: theotherp/nzbhydra2

@Override
public void onCreate(Session session) throws CloseSessionException {
  logger.info("Create SESSION[{}] for {}", session.getId(), session.getClientAddress());
}
origin: fengyouchao/sockslib

@Override
public void onCreate(Session session) throws CloseSessionException {
 logger.info("Create SESSION[{}] for {}", session.getId(), session.getClientAddress());
}
origin: theotherp/nzbhydra2

@Override
public void doUDPAssociate(Session session, CommandMessage commandMessage) throws
    SocksException, IOException {
  UDPRelayServer udpRelayServer =
      new UDPRelayServer(((InetSocketAddress) session.getClientAddress()).getAddress(),
          commandMessage.getPort());
  InetSocketAddress socketAddress = (InetSocketAddress) udpRelayServer.start();
  logger.info("Create UDP relay server at[{}] for {}", socketAddress, commandMessage
      .getSocketAddress());
  session.write(new CommandResponseMessage(VERSION, ServerReply.SUCCEEDED, InetAddress
      .getLocalHost(), socketAddress.getPort()));
  while (udpRelayServer.isRunning()) {
    try {
      Thread.sleep(idleTime);
    } catch (InterruptedException e) {
      session.close();
      logger.info("Session[{}] closed", session.getId());
    }
    if (session.isClose()) {
      udpRelayServer.stop();
      logger.debug("UDP relay server for session[{}] is closed", session.getId());
    }
  }
}
origin: fengyouchao/sockslib

@Override
public void doUDPAssociate(Session session, CommandMessage commandMessage) throws
  SocksException, IOException {
 UDPRelayServer udpRelayServer =
   new UDPRelayServer(((InetSocketAddress) session.getClientAddress()).getAddress(),
     commandMessage.getPort());
 InetSocketAddress socketAddress = (InetSocketAddress) udpRelayServer.start();
 logger.info("Create UDP relay server at[{}] for {}", socketAddress, commandMessage
   .getSocketAddress());
 session.write(new CommandResponseMessage(VERSION, ServerReply.SUCCEEDED, InetAddress
   .getLocalHost(), socketAddress.getPort()));
 while (udpRelayServer.isRunning()) {
  try {
   Thread.sleep(idleTime);
  } catch (InterruptedException e) {
   session.close();
   logger.info("Session[{}] closed", session.getId());
  }
  if (session.isClose()) {
   udpRelayServer.stop();
   logger.debug("UDP relay server for session[{}] is closed", session.getId());
  }
 }
}
sockslib.serverSessiongetClientAddress

Javadoc

Get remote host's IP address and port.

Popular methods of Session

  • close
    Closes connection and removes itself from managed sessions.
  • getId
    Gets session ID.
  • getSocket
    Returns socket.
  • isClose
    Returns true if the session is closed.
  • read
    Read a buffer.
  • setAttribute
  • write
    Writes bytes in output stream.

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getContentResolver (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now