public class UdpManager extends Object
| Constructor and Description |
|---|
UdpManager(Scheduler scheduler,
PortManager portManager,
PortManager localPortManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelector(Selector selector) |
void |
bind(DatagramChannel channel,
int port)
Binds socket to global bind address and specified port.
|
void |
bind(DatagramChannel channel,
int port,
boolean local) |
void |
bindLocal(DatagramChannel channel,
int port)
Binds socket to global bind address and specified port.
|
boolean |
connectImmediately(InetSocketAddress address) |
String |
getBindAddress()
Gets the bind address.
|
String |
getExternalAddress() |
int |
getHighestPort()
Gets the upper boundary of available range.
|
String |
getLocalBindAddress()
Gets the bind address.
|
String |
getLocalNetwork() |
String |
getLocalSubnet() |
int |
getLowestPort()
Gets the low boundary of available range.
|
PortManager |
getPortManager() |
int |
getRtpTimeout()
Gets the rtp timeout.
|
Scheduler |
getScheduler() |
SelectionKey |
open(Channel channel) |
SelectionKey |
open(DatagramChannel dataChannel,
Channel channel)
Deprecated.
|
void |
open(DatagramChannel channel,
ProtocolHandler handler)
Deprecated.
|
DatagramChannel |
open(ProtocolHandler handler)
Deprecated.
|
void |
register(NetworkChannel channel) |
void |
setBindAddress(String address)
Modify bind address.
|
void |
setExternalAddress(String externalAddress) |
void |
setLocalBindAddress(String address)
Modify bind address.
|
void |
setLocalNetwork(String localNetwork)
Set the local network address
|
void |
setLocalSubnet(String localSubnet)
Set the local network address
|
void |
setRtpTimeout(int rtpTimeout)
Modify rtp timeout.
|
void |
setUseSbc(Boolean useSbc)
Set the useSbc property
|
void |
start()
Starts polling the network.
|
void |
stop()
Stops polling the network.
|
public UdpManager(Scheduler scheduler, PortManager portManager, PortManager localPortManager)
public Scheduler getScheduler()
public void setBindAddress(String address)
address - the IP address as character string.public String getBindAddress()
public void setLocalBindAddress(String address)
address - the IP address as character string.public String getLocalBindAddress()
public String getExternalAddress()
public void setExternalAddress(String externalAddress)
public void setRtpTimeout(int rtpTimeout)
rtpTimeout - the time in seconds.public int getRtpTimeout()
public void setLocalNetwork(String localNetwork)
address - the IP address as character string.public String getLocalNetwork()
public void setLocalSubnet(String localSubnet)
address - the IP subnet as character string.public String getLocalSubnet()
public void setUseSbc(Boolean useSbc)
useSbc - whether to use sbc or notpublic PortManager getPortManager()
public int getLowestPort()
public int getHighestPort()
public void addSelector(Selector selector)
public boolean connectImmediately(InetSocketAddress address)
@Deprecated public DatagramChannel open(ProtocolHandler handler) throws IOException
handler - the packet handler implementationport - the port to bind toIOExceptionpublic SelectionKey open(Channel channel) throws IOException
IOExceptionpublic void register(NetworkChannel channel) throws IOException
IOException@Deprecated public SelectionKey open(DatagramChannel dataChannel, Channel channel) throws IOException
IOException@Deprecated public void open(DatagramChannel channel, ProtocolHandler handler) throws IOException
IOExceptionpublic void bind(DatagramChannel channel, int port, boolean local) throws IOException
IOExceptionpublic void bind(DatagramChannel channel, int port) throws IOException
channel - the channelport - the port to bind toIOExceptionpublic void bindLocal(DatagramChannel channel, int port) throws IOException
channel - the channelport - the port to bind toIOExceptionpublic void start()
public void stop()
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.