-
Notifications
You must be signed in to change notification settings - Fork 0
/
Peers.java
49 lines (43 loc) · 828 Bytes
/
Peers.java
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
47
48
49
import java.io.Serializable;
import java.net.InetAddress;
/**
* @author abhin
* class to store the peers as objects
*/
public class Peers implements Serializable {
InetAddress ra;
int rp;
/**
* @param ra the address of the peer
* @param rp the port to which the peer is connected
*/
public Peers(InetAddress ra, int rp) {
super();
this.ra = ra;
this.rp = rp;
}
/**
* @return the address of the peer
*/
public InetAddress getRa() {
return ra;
}
/**
* @param ra set the address of the peer
*/
public void setRa(InetAddress ra) {
this.ra = ra;
}
/**
* @return the port number of the peer
*/
public int getRp() {
return rp;
}
/**
* @param rp set the port number of the peer
*/
public void setRp(int rp) {
this.rp = rp;
}
}