Added apps/q - the Q distributed file store framework, by aum

This commit is contained in:
aum
2005-04-18 17:03:21 +00:00
committed by zzz
parent 7f3c953e14
commit 418facc7e0
80 changed files with 17037 additions and 0 deletions

View File

@ -0,0 +1,56 @@
// runs EchoServer and EchoClient as threads
package net.i2p.aum;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.net.*;
import net.i2p.*;
import net.i2p.client.*;
import net.i2p.client.streaming.*;
import net.i2p.data.*;
/**
* A simple program which runs the EchoServer and EchoClient
* demos as threads
*/
public class EchoTest
{
/**
* create one instance each of EchoServer and EchoClient,
* run the server as a thread, run the client in foreground,
* display detailed results
*/
public static void main(String [] args)
{
EchoServer server;
EchoClient client;
try {
server = new EchoServer();
Destination serverDest = server.getDest();
System.out.println("EchoTest: serverDest=" + serverDest.toBase64());
client = new EchoClient(serverDest);
} catch (I2PException e) {
e.printStackTrace(); return;
} catch (IOException e) {
e.printStackTrace(); return;
}
System.out.println("Starting server...");
//server.start();
System.out.println("Starting client...");
client.run();
}
}