net.i2p.i2ptunnel.socks
Class SOCKSUDPWrapper

java.lang.Object
  extended by net.i2p.i2ptunnel.socks.SOCKSUDPWrapper
All Implemented Interfaces:
Sink, Source

public class SOCKSUDPWrapper
extends java.lang.Object
implements Source, Sink

Put a SOCKS header on a datagram Ref: RFC 1928

Author:
zzz

Constructor Summary
SOCKSUDPWrapper(java.util.Map<Destination,SOCKSHeader> cache)
           
 
Method Summary
 void send(Destination from, byte[] data)
          Use the cached header, which should have the host string and port
 void setSink(Sink sink)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOCKSUDPWrapper

public SOCKSUDPWrapper(java.util.Map<Destination,SOCKSHeader> cache)
Method Detail

setSink

public void setSink(Sink sink)
Specified by:
setSink in interface Source

start

public void start()
Specified by:
start in interface Source

send

public void send(Destination from,
                 byte[] data)
Use the cached header, which should have the host string and port

Specified by:
send in interface Sink