Advertisement
PhanNguyen

Untitled

Oct 9th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1. /**
  2.  * Created by phann on 10/9/2016.
  3.  */
  4. public enum MsgType {
  5.     /*AUTHORIZATION*/
  6.     LOGIN,                      LOGIN_OK,LOGIN_DENY,
  7.     GET_USER_STATUS,            USER_STATUS_RETURN,
  8.  
  9.     /*CHAT CONTROL*/
  10.     REQUEST_NEW_CHAT,           NEW_CHAT,
  11.     SEND_MSG,                   MSG,
  12.     QUIT_CHAT,                  CHAT_END,
  13.     SEND_FILE,                  FILE,
  14.  
  15. }
  16.  
  17.  
  18. ----------------------------------------------------------------------------------------
  19.  
  20. import java.io.Serializable;
  21. import java.util.Vector;
  22.  
  23. /**
  24.  * Created by phann on 10/9/2016.
  25.  */
  26. public class ProtocolMsg implements Serializable {
  27.     public MsgType type;
  28.     public Vector<String> msg;
  29.     public byte[] file = null;
  30.  
  31.     ProtocolMsg(MsgType type, Vector<String> msg, byte[] file){
  32.         this.type = type;
  33.         this.msg = msg;
  34.         this.file = file;
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement