io.vertx.core.net

## Interface SocketAddress

-     public interface SocketAddress

  The address of a socket, an inet socket address or a domain socket address.

  Use `inetSocketAddress(int, String)` to create an inet socket address and `domainSocketAddress(String)` to create a domain socket address
  Author:
    Tim Fox

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SocketAddress` | `domainSocketAddress(String path)` Create a domain socket address from a `path`.
    `String` | `host()` Returns the host name when available or the IP address in string representation.
    `String` | `hostAddress()` Returns the host IP address when available or `null` as a String.
    `String` | `hostName()` Returns the host name when available or `null` Domain socket address returns `null`.
    `static SocketAddress` | `inetSocketAddress(InetSocketAddress address)` Create a inet socket address from a Java `InetSocketAddress`.
    `static SocketAddress` | `inetSocketAddress(int port, String host)` Create a inet socket address, `host` must be non `null` and `port` must be between `0` and `65536`.
    `boolean` | `isDomainSocket()`
    `boolean` | `isInetSocket()`
    `String` | `path()`
    `int` | `port()`

- - ### Method Detail

    - #### inetSocketAddress

          static SocketAddress inetSocketAddress(int port,
                                                 String host)

      Create a inet socket address, `host` must be non `null` and `port` must be between `0` and `65536`.
      The `host` string can be an host name or an host address.
      No name resolution will be attempted.
      Parameters:
        `port` - the port
        `host` - the host
      Returns:
        the created socket address

    - #### domainSocketAddress

          static SocketAddress domainSocketAddress(String path)

      Create a domain socket address from a `path`.
      Parameters:
        `path` - the address path
      Returns:
        the created socket address

    - #### inetSocketAddress

          static SocketAddress inetSocketAddress(InetSocketAddress address)

      Create a inet socket address from a Java `InetSocketAddress`.
      No name resolution will be attempted.
      Parameters:
        `address` - the address
      Returns:
        the created socket address

    - #### host

          String host()

      Returns the host name when available or the IP address in string representation.
      Domain socket address returns `null`.
      Returns:
        the host address

    - #### hostName

          String hostName()

      Returns the host name when available or `null`
      Domain socket address returns `null`.
      Returns:
        the host name

    - #### hostAddress

          String hostAddress()

      Returns the host IP address when available or `null` as a String.
      Domain socket address returns `null`.
      Returns:
        the host address

    - #### port

          int port()

      Returns:
        the address port or `-1` for a domain socket

    - #### path

          String path()

      Returns:
        the domain socket path or `null` for a inet socket address.

    - #### isInetSocket

          boolean isInetSocket()

      Returns:
        `true` for an inet socket address

    - #### isDomainSocket

          boolean isDomainSocket()

      Returns:
        `true` for an domain socket address

Copyright © 2021 Eclipse. All rights reserved.