rabbit.proxy
Class Tunnel
java.lang.Object
rabbit.proxy.Tunnel
public class Tunnel
- extends Object
A handler that just tunnels data.
- Author:
- Robert Olofsson
Method Summary |
void |
start()
Start tunneling data in both directions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Tunnel
public Tunnel(NioHandler nioHandler,
SocketChannel from,
BufferHandle fromHandle,
TrafficLogger fromLogger,
SocketChannel to,
BufferHandle toHandle,
TrafficLogger toLogger,
rabbit.proxy.TunnelDoneListener listener)
- Create a tunnel that transfers data as fast as possible in full
duplex.
- Parameters:
nioHandler
- the NioHandler to use for waiting on data to read
as well as waiting for write readyfrom
- one end of the tunnelfromHandle
- the ByteBuffer holder for the data from "from"fromLogger
- the traffic statistics gatherer for "from"to
- the other end of the tunneltoHandle
- the ByteBuffer holder for the data from "from"toLogger
- the traffic statistics gatherer for "from"listener
- the listener that will be notified when the tunnel
is closed
start
public void start()
- Start tunneling data in both directions.