summaryrefslogtreecommitdiff
path: root/src/common/PeerMessage.java
blob: 5ef95f8abd67eb13c02744db17cec84a564d0522 (plain)
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
package common;
import java.io.*;
import java.util.*;


public class PeerMessage implements Serializable {
	private static final long serialVersionUID = 3667108226485766929L;
	
	public enum Type {
		JOIN, JOIN_RESULT, ADD_PEERS, REMOVE_PEERS, PAYLOAD, EXTRA;
	}

	public Type type;
	public PeerInformation sender;
	public PeerCoordinates location;
	public ArrayList<PeerInformation> peers;
	public CollidableObject payload;
	public Object extra;

	public PeerMessage(Type type, PeerInformation sender) {
		this.type = type;
		this.sender = sender;
		peers = new ArrayList<PeerInformation>();
	}
}