* i2ptunnel: Use I2PAppThread

This commit is contained in:
zzz
2014-08-21 11:58:09 +00:00
parent 51e45d128a
commit 915e003355
3 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package net.i2p.i2ptunnel.streamr; package net.i2p.i2ptunnel.streamr;
import net.i2p.i2ptunnel.udp.*; import net.i2p.i2ptunnel.udp.*;
import net.i2p.util.I2PAppThread;
/** /**
* *
@@ -9,7 +10,7 @@ import net.i2p.i2ptunnel.udp.*;
public class Pinger implements Source, Runnable { public class Pinger implements Source, Runnable {
public Pinger() { public Pinger() {
this.thread = new Thread(this); this.thread = new I2PAppThread(this);
} }
public void setSink(Sink sink) { public void setSink(Sink sink) {

View File

@@ -6,6 +6,7 @@ import java.util.concurrent.BlockingQueue;
import net.i2p.client.I2PSession; import net.i2p.client.I2PSession;
import net.i2p.client.I2PSessionListener; import net.i2p.client.I2PSessionListener;
import net.i2p.client.datagram.I2PDatagramDissector; import net.i2p.client.datagram.I2PDatagramDissector;
import net.i2p.util.I2PAppThread;
/** /**
* *
@@ -33,7 +34,7 @@ public class I2PSource implements Source, Runnable {
this.sess.setSessionListener(new Listener()); this.sess.setSessionListener(new Listener());
// create thread // create thread
this.thread = new Thread(this); this.thread = new I2PAppThread(this);
} }
public void setSink(Sink sink) { public void setSink(Sink sink) {

View File

@@ -3,6 +3,8 @@ package net.i2p.i2ptunnel.udp;
import java.net.DatagramSocket; import java.net.DatagramSocket;
import java.net.DatagramPacket; import java.net.DatagramPacket;
import net.i2p.util.I2PAppThread;
/** /**
* *
* @author welterde * @author welterde
@@ -19,13 +21,13 @@ public class UDPSource implements Source, Runnable {
} }
// create thread // create thread
this.thread = new Thread(this); this.thread = new I2PAppThread(this);
} }
/** use socket from UDPSink */ /** use socket from UDPSink */
public UDPSource(DatagramSocket sock) { public UDPSource(DatagramSocket sock) {
this.sock = sock; this.sock = sock;
this.thread = new Thread(this); this.thread = new I2PAppThread(this);
} }
public void setSink(Sink sink) { public void setSink(Sink sink) {