Java технологія. Основні риси та перспективи застосування, Детальна інформація
Java технологія. Основні риси та перспективи застосування
client = c;
Socket server = new Socket(site, port);
in = new DataInputStream(server.getInputStream());
out = new PrintStream(server.getOutputStream(), true);
}
private String readline() {
try {
return in.readLine();
} catch (IOException e) {
return null;
}
}
void setName(String s) {
out.println("name " + s);
}
void delete() {
out.println("delete " + id);
}
void setTo(String to) {
toid = to;
}
void send(String s) {
if (toid != null)
out.println("to " + toid + " " + s);
}
void chat(String s) {
send("chat " + id + " " + s);
}
void quit() {
send("quit " + id); // tell other player
Socket server = new Socket(site, port);
in = new DataInputStream(server.getInputStream());
out = new PrintStream(server.getOutputStream(), true);
}
private String readline() {
try {
return in.readLine();
} catch (IOException e) {
return null;
}
}
void setName(String s) {
out.println("name " + s);
}
void delete() {
out.println("delete " + id);
}
void setTo(String to) {
toid = to;
}
void send(String s) {
if (toid != null)
out.println("to " + toid + " " + s);
}
void chat(String s) {
send("chat " + id + " " + s);
}
void quit() {
send("quit " + id); // tell other player
The online video editor trusted by teams to make professional video in
minutes
© Referats, Inc · All rights reserved 2021