org.apache.tomcat.jni

## Class Local

- java.lang.Object
- - org.apache.tomcat.jni.Local

-     public class Local
      extends Object

  Local socket
  Author:
    Mladen Turk

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Local()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `accept(long sock)` Accept a new connection request
    `static int` | `bind(long sock, long sa)` Bind the socket to its associated port
    `static int` | `connect(long sock, long sa)` Issue a connection request to a socket either on the same machine or a different one.
    `static long` | `create(String path, long cont)` Create a socket.
    `static int` | `listen(long sock, int backlog)` Listen to a bound socket for connections.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Local

          public Local()

  - ### Method Detail

    - #### create

          public static long create(String path,
                    long cont)
                             throws Exception

      Create a socket.
      Parameters:
        `path` - The address of the new socket.
        `cont` - The parent pool to use
      Returns:
        The new socket that has been set up.
      Throws:
        `Exception`

    - #### bind

          public static int bind(long sock,
                 long sa)

      Bind the socket to its associated port
      Parameters:
        `sock` - The socket to bind
        `sa` - The socket address to bind to This may be where we will find out if there is any other process using the selected port.

    - #### listen

          public static int listen(long sock,
                   int backlog)

      Listen to a bound socket for connections.
      Parameters:
        `sock` - The socket to listen on
        `backlog` - The number of outstanding connections allowed in the sockets listen queue. If this value is less than zero, for NT pipes the number of instances is unlimited.

    - #### accept

          public static long accept(long sock)
                             throws Exception

      Accept a new connection request
      Parameters:
        `sock` - The socket we are listening on.
      Returns:
        A copy of the socket that is connected to the socket that made the connection request. This is the socket which should be used for all future communication.
      Throws:
        `Exception`

    - #### connect

          public static int connect(long sock,
                    long sa)

      Issue a connection request to a socket either on the same machine or a different one.
      Parameters:
        `sock` - The socket we wish to use for our side of the connection
        `sa` - The address of the machine we wish to connect to. Unused for NT Pipes.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.