com.aelitis.azureus.core.networkmanager.impl.tcp
Class VirtualNonBlockingServerChannelSelector
java.lang.Object
com.aelitis.azureus.core.networkmanager.impl.tcp.VirtualNonBlockingServerChannelSelector
- All Implemented Interfaces:
- VirtualServerChannelSelector
public class VirtualNonBlockingServerChannelSelector
- extends java.lang.Object
- implements VirtualServerChannelSelector
Virtual server socket channel for listening and accepting incoming connections.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
this_mon
protected final AEMonitor this_mon
VirtualNonBlockingServerChannelSelector
public VirtualNonBlockingServerChannelSelector(java.net.InetSocketAddress bind_address,
int so_rcvbuf_size,
VirtualServerChannelSelector.SelectListener listener)
- Create a new server listening on the given address and reporting to the given listener.
- Parameters:
bind_address
- ip+port to listen onso_rcvbuf_size
- new socket receive buffer sizelistener
- to notify of incoming connections
VirtualNonBlockingServerChannelSelector
public VirtualNonBlockingServerChannelSelector(java.net.InetAddress _bind_address,
int _start_port,
int _num_ports,
int _so_rcvbuf_size,
VirtualServerChannelSelector.SelectListener _listener)
start
public void start()
- Start the server and begin accepting incoming connections.
- Specified by:
start
in interface VirtualServerChannelSelector
stop
public void stop()
- Stop the server.
- Specified by:
stop
in interface VirtualServerChannelSelector
isRunning
public boolean isRunning()
- Is this selector actively running
- Specified by:
isRunning
in interface VirtualServerChannelSelector
- Returns:
- true if enabled, false if not running
getBoundToAddress
public java.net.InetAddress getBoundToAddress()
- Specified by:
getBoundToAddress
in interface VirtualServerChannelSelector
getPort
public int getPort()
- Specified by:
getPort
in interface VirtualServerChannelSelector
getTimeOfLastAccept
public long getTimeOfLastAccept()
- Specified by:
getTimeOfLastAccept
in interface VirtualServerChannelSelector