# 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 HttpsServer`
HttpsServer.`create(InetSocketAddress addr, int backlog)`
Create a `HttpsServer` instance which will bind to the specified `InetSocketAddress` (IP address and port number).

## 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.