net.i2p.BOB
Class UDPIOthread

java.lang.Object
  extended by net.i2p.BOB.UDPIOthread
All Implemented Interfaces:
java.lang.Runnable, I2PSessionListener

public class UDPIOthread
extends java.lang.Object
implements I2PSessionListener, java.lang.Runnable

UDP IO on I2P FIX ME: Untested, and incomplete! I have no personal need to UDP yet, however alot of p2p apps pretty much demand it. The skeletal frame is here, just needs to be finished.

Author:
sponge

Constructor Summary
UDPIOthread(NamedDB info, Log _log, java.net.Socket socket, I2PSession _session)
          Constructor
 
Method Summary
 void disconnected(I2PSession session)
          required by I2PSessionListener to notify of disconnect
 void errorOccurred(I2PSession session, java.lang.String message, java.lang.Throwable error)
          required by I2PSessionListener to notify of error
 void messageAvailable(I2PSession session, int msgId, long size)
          Instruct the client that the given session has received a message with size # of bytes.
 void reportAbuse(I2PSession session, int severity)
          required by I2PSessionListener to notify of abuse
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDPIOthread

UDPIOthread(NamedDB info,
            Log _log,
            java.net.Socket socket,
            I2PSession _session)
Constructor

Parameters:
info -
_log -
socket -
_session -
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

messageAvailable

public void messageAvailable(I2PSession session,
                             int msgId,
                             long size)
Description copied from interface: I2PSessionListener
Instruct the client that the given session has received a message with size # of bytes.

Specified by:
messageAvailable in interface I2PSessionListener
Parameters:
session -
msgId -
size -

disconnected

public void disconnected(I2PSession session)
required by I2PSessionListener to notify of disconnect

Specified by:
disconnected in interface I2PSessionListener

errorOccurred

public void errorOccurred(I2PSession session,
                          java.lang.String message,
                          java.lang.Throwable error)
required by I2PSessionListener to notify of error

Specified by:
errorOccurred in interface I2PSessionListener

reportAbuse

public void reportAbuse(I2PSession session,
                        int severity)
required by I2PSessionListener to notify of abuse

Specified by:
reportAbuse in interface I2PSessionListener
Parameters:
session - session to report abuse to
severity - how bad the abuse is