-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.java
More file actions
47 lines (39 loc) · 889 Bytes
/
User.java
File metadata and controls
47 lines (39 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package chatapp;
import java.io.Serializable;
import java.net.InetAddress;
import java.net.Socket;
public class User implements Serializable
{
String username;
InetAddress ip;
int port;
boolean is_online;
//Socket socket;
public User(User user) {
super();
this.username = user.username;
this.ip = user.ip;
this.port = user.port;
this.is_online = user.is_online;
}
public User(String username,int port) {
super();
this.username = username;
this.port = port;
}
public User(String username,InetAddress ip,int port) {
super();
this.username = username;
this.ip = ip;
this.port = port;
}
public User(String username, InetAddress ip, int port, boolean is_online,
Socket socket) {
super();
this.username = username;
this.ip = ip;
this.port = port;
this.is_online = is_online;
//this.socket = socket;
}
}