public class Ports extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
static int |
MAX_PORT |
static int |
MIN_DYN_PORT |
| Constructor and Description |
|---|
Ports()
Creates a binding class that binds to everything.
|
Ports(int externalTCPPort,
int externalUDPPort)
Creates a Binding class that binds to a specified protocol and provides
information about manual port forwarding.
|
| Modifier and Type | Method and Description |
|---|---|
int |
externalTCPPort() |
int |
externalUDPPort() |
boolean |
isSetExternalPortsManually() |
public static final int MAX_PORT
public static final int MIN_DYN_PORT
public static final int DEFAULT_PORT
public Ports()
public Ports(int externalTCPPort,
int externalUDPPort)
protocol - The protocol to bind toexternalAddress - The external address, how other peers will see us. Use null if
you don't want to use external addressexternalTCPPort - The external port, how other peers will see us, if 0 is
provided, a random port will be usedexternalUDPPort - The external port, how other peers will see us, if 0 is
provided, a random port will be usedpublic int externalTCPPort()
public int externalUDPPort()
public boolean isSetExternalPortsManually()
Copyright © 2014. All rights reserved.