Top Description Methods
org.java_websocket.client

public Interface DnsResolver

Imports
java.net.InetAddress, .URI, .UnknownHostException

Users may implement this interface to override the default DNS lookup offered by the OS.
Since
1.4.1

Method Summary

Modifier and TypeMethod and Description
public InetAddress

Returns:

The resolved IP address
resolve
(URI
The URI to be resolved
uri
)

Resolves the IP address for the given URI.

Method Detail

resolveback to summary
public InetAddress resolve(URI uri) throws UnknownHostException

Resolves the IP address for the given URI.

This method should never return null. If it's not able to resolve the IP address then it should throw an UnknownHostException

Parameters
uri:URI

The URI to be resolved

Returns:InetAddress

The resolved IP address

Exceptions
UnknownHostException:
if no IP address for the uri could be found.