public abstract class BandwidthLimitingTunnelHandlerThread extends Object implements Runnable, BitRateProvider
BandwidthLimitingTunnel.BandwidthLimitingTunnelHandler,
BandwidthLimitingTunnelMINIMUM_BIT_RATE| Constructor and Description |
|---|
BandwidthLimitingTunnelHandlerThread(boolean verbose,
Long bandwidth,
Socket listenSocket,
Socket connectSocket) |
| Modifier and Type | Method and Description |
|---|---|
Long |
getBitRate()
Gets the bit rate in bits per second,
null indicates unlimited bandwidth. |
int |
getBlockSize()
Gets the block size in bytes.
|
protected abstract String |
getDirection() |
protected abstract InputStream |
getInputStream(Socket listenSocket,
Socket connectSocket) |
protected abstract OutputStream |
getOutputStream(Socket listenSocket,
Socket connectSocket) |
void |
run() |
void |
start() |
public void start()
public int getBlockSize()
BitRateProvidergetBlockSize in interface BitRateProviderpublic Long getBitRate()
BitRateProvidernull indicates unlimited bandwidth.getBitRate in interface BitRateProviderprotected abstract String getDirection()
protected abstract OutputStream getOutputStream(Socket listenSocket, Socket connectSocket) throws IOException
IOExceptionprotected abstract InputStream getInputStream(Socket listenSocket, Socket connectSocket) throws IOException
IOExceptionCopyright © 2016. All rights reserved.