public class PublicIPResolver extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PublicIPResolver.Header |
| Constructor and Description |
|---|
PublicIPResolver() |
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
createSTUNChangeRequest() |
static InetSocketAddress |
getPublicAddress(SelDatagramChannel channel,
String stunServer,
int port) |
static InetSocketAddress |
getPublicAddress(String stunServer,
int port) |
static PublicIPResolver.Header |
parseResponse(byte[] data) |
static int |
unsignedByteToInt(byte b) |
static int |
unsignedShortToInt(byte[] b) |
public static ByteBuffer createSTUNChangeRequest()
public static PublicIPResolver.Header parseResponse(byte[] data)
public static int unsignedShortToInt(byte[] b)
public static int unsignedByteToInt(byte b)
public static InetSocketAddress getPublicAddress(String stunServer, int port)
public static InetSocketAddress getPublicAddress(SelDatagramChannel channel, String stunServer, int port)
Copyright © 2021. All rights reserved.