Java технологія. Основні риси та перспективи застосування
void chat(String s) {
send("chat " + id + " " + s);
}
void quit() {
send("quit " + id); // tell other player
out.println("quit");
stop();
}
private Thread t;
void start() {
t = new Thread(this);
t.start();
}void stop() {
t.stop();
}
private static final int ID = 1;
private static final int ADD = 2;
private static final int DELETE = 3;
private static final int CHAT = 4;
private static final int QUIT = 5;
private static Hashtable keys = new Hashtable();
private static String keystrings[] = {
"", "id", "add", "delete","chat",
"quit"
};