Реферат: Java технологія и основні риси та перспективи застосування
public ClientConnection(Server srv, Socket s, int i) {
try {
server = srv;
sock = s;
in = new DataInputStream(s.getInputStream());
out = s.getOutputStream();
host = s.getInetAddress().getHostName();
id = "" + i;
// tell the new one who it is...
write("id " + id + CRLF);
new Thread(this).start();
} catch (IOException e) {
System.out.println("failed ClientConnection " + e);
}
}
public String toString() {
return id + " " + host + " " + name;
}
public String getHost() {
return host;
}
public String getId() {
return id;
}
public boolean isBusy() {
return busy;
}
public void setBusy(boolean b) {
busy = b;