Added test classes for the networking and made so that the network engine sends object insted of raw data

This commit is contained in:
Ziver Koc 2007-06-03 19:20:26 +00:00
parent a0363aa3d8
commit 16b9f1f265
11 changed files with 161 additions and 53 deletions

View file

@ -0,0 +1,21 @@
package ei.engine.test;
import java.io.IOException;
import ei.engine.network.NioNetwork;
import ei.engine.network.NioServer;
import ei.engine.network.worker.EchoWorker;
public class NetworkServer {
public static void main(String[] args) {
try {
EchoWorker worker = new EchoWorker();
new Thread(worker).start();
NioNetwork server = new NioServer(null, 6056);
server.setWorker(worker);
new Thread(server).start();
} catch (IOException e) {
e.printStackTrace();
}
}
}