-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLogMessage.java
More file actions
14 lines (14 loc) · 1.16 KB
/
LogMessage.java
File metadata and controls
14 lines (14 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public enum LogMessage {
// called using these log messages and string array of args
CLIENT_CONNECT, // TCP Connection to peer; args = [neighbour_peer:String]
SERVER_CONNECT, // TCP Connection from peer; args = [neighbour_peer:String]
CHANGE_PREFERRED_NEIGHBOURS, // change of preferred neighbours; args = peers:String[]
CHANGE_OPTIMISTIC_NEIGHBOUR, // change of optimistically unchoked neighbour; args = [optimistically_unchoked_neighbourid:String]
UNCHOKING, // unchoking; args = [neighbour_peer:String]
CHOKING, // choking; args = [neighbour_peer:String]
RECEIVE_HAVE, // receiving have message; args = [neighbour_peer:String,piece_index:String]
RECEIVE_INTERESTED, // receiving interested message; args = [neighbour_peer:String]
RECEIVE_NOT_INTERESTED, // receiving not interested message; args = [neighbour_peer:String]
PIECE_DOWNLOAD, // downloading a piece; args = [neighbour_peer:String,piece_index:String,num_pieces:String]
DOWNLOAD_COMPLETE // completion of download; args = null
}