Uses of Class java.net.InetSocketAddress (Java SE 22 & JDK 22)
Description: use: module: java.base, package: java.net, class: InetSocketAddress

# Uses of Class
java.net.InetSocketAddress

Packages that use InetSocketAddress
Package
Description
com.sun.net.httpserver
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers.
com.sun.net.httpserver.spi
Provides a pluggable service provider interface, which allows the HTTP server implementation to be replaced with other implementations.
java.net
Provides the classes for implementing networking applications.

- ## Uses of InetSocketAddress in com.sun.net.httpserver

  Methods in com.sun.net.httpserver that return InetSocketAddress
  Modifier and Type
  Method
  Description
  `abstract InetSocketAddress`
  HttpServer.`getAddress()`
  Returns the address this server is listening on
  `abstract InetSocketAddress`
  HttpsParameters.`getClientAddress()`
  Returns the address of the remote client initiating the connection.
  `abstract InetSocketAddress`
  HttpExchange.`getLocalAddress()`
  Returns the local address on which the request was received.
  `abstract InetSocketAddress`
  HttpExchange.`getRemoteAddress()`
  Returns the address of the remote entity invoking this request.
  Methods in com.sun.net.httpserver with parameters of type InetSocketAddress
  Modifier and Type
  Method
  Description
  `abstract void`
  HttpServer.`bind(InetSocketAddress addr, int backlog)`
  Binds a currently unbound `HttpServer` to the given address and port number.
  `static HttpServer`
  HttpServer.`create(InetSocketAddress addr, int backlog)`
  Create a `HttpServer` instance which will bind to the specified `InetSocketAddress` (IP address and port number).
  `static HttpServer`
  HttpServer.`create(InetSocketAddress addr, int backlog, String path, HttpHandler handler, Filter... filters)`
  Creates an `HttpServer` instance with an initial context.
  `static HttpsServer`
  HttpsServer.`create(InetSocketAddress addr, int backlog)`
  Create a `HttpsServer` instance which will bind to the specified `InetSocketAddress` (IP address and port number).
  `static HttpsServer`
  HttpsServer.`create(InetSocketAddress addr, int backlog, String path, HttpHandler handler, Filter... filters)`
  Creates an `HttpsServer` instance with an initial context.
  `static HttpServer`
  SimpleFileServer.`createFileServer(InetSocketAddress addr, Path rootDirectory, SimpleFileServer.OutputLevel outputLevel)`
  Creates a file server that serves files from a given path.

- ## Uses of InetSocketAddress in com.sun.net.httpserver.spi

  Methods in com.sun.net.httpserver.spi with parameters of type InetSocketAddress
  Modifier and Type
  Method
  Description
  `abstract HttpServer`
  HttpServerProvider.`createHttpServer(InetSocketAddress addr, int backlog)`
  creates a HttpServer from this provider
  `abstract HttpsServer`
  HttpServerProvider.`createHttpsServer(InetSocketAddress addr, int backlog)`
  creates a HttpsServer from this provider

- ## Uses of InetSocketAddress in java.net

  Methods in java.net that return InetSocketAddress
  Modifier and Type
  Method
  Description
  `static InetSocketAddress`
  InetSocketAddress.`createUnresolved(String host, int port)`
  Creates an unresolved socket address from a hostname and a port number.
  Methods in java.net with parameters of type InetSocketAddress
  Modifier and Type
  Method
  Description
  `static ProxySelector`
  ProxySelector.`of(InetSocketAddress proxyAddress)`
  Returns a ProxySelector which uses the given proxy address for all HTTP and HTTPS requests.