proproxy
Class ProUDPListener
java.lang.Object
|
+--proproxy.ProUDPListener
- All Implemented Interfaces:
- java.lang.Runnable
- public class ProUDPListener
- extends java.lang.Object
- implements java.lang.Runnable
ProUDPListener
The UDP connection listener. Waits for a new UDP packet, changes the target
host and port and relays it again.
You are free to use this code and to make modifications provided
this notice is retained.
If you found this useful, please add a note of acknowledgement to my
guestbook.
If you would like to report a bug or suggest some improvements,
you are most welcome. I will be happy to help you use this piece of code.
- Version:
- 1.20, 31st Oct, 2001
- Author:
- Tanmay K. Mohapatra
Constructor Summary |
ProUDPListener(int iListenPort,
java.lang.String sCascadeServer,
int iCascadePort,
java.lang.String sIncludeList,
java.lang.String sExcludeList)
Save the connection parameters |
Method Summary |
boolean |
isListening()
|
void |
run()
The listener loop. |
void |
startListening()
If listener thread is stopped and not listening, start it. |
void |
stopListening()
If listener thread is active and listening, stop it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iNumRequests
public int iNumRequests
ProUDPListener
public ProUDPListener(int iListenPort,
java.lang.String sCascadeServer,
int iCascadePort,
java.lang.String sIncludeList,
java.lang.String sExcludeList)
- Save the connection parameters
run
public void run()
- The listener loop.
- Specified by:
run
in interface java.lang.Runnable
startListening
public void startListening()
- If listener thread is stopped and not listening, start it.
stopListening
public void stopListening()
- If listener thread is active and listening, stop it.
isListening
public boolean isListening()
- Returns:
- true if the listener thread is active and listening