日期:2014-05-18 浏览次数:21065 次
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NetLib { [Serializable] public class NetMsg { #region 常量定义 public const string ALL_PEOPLE = "/all"; public const int BUFFER_SIZE = 4000; public const int OPR_MOV = 0; public const int OPR_CREATE = 1; public const int OPR_START_MOV = 2; public const int OPR_DESTROY = 3; public const int OPR_LOST_BLOOD = 4; public const int OPR_STOP_MOV = 5; public const int OPR_TURN=6; public const int LOGIN = 7; public const int LOGOUT = 8; public const int ROOM_APPLY = 9; public const int ROOM_ENTER = 10; public const int OPR_CHAT=11; public const int ROOM_CREATE=12; public const int MAX_ROOM = 13; public const int MAX_USER = 14; public const int ROOM_FULL = 15; public const int ROOMS_INFO=16; public const int USERS_INFO=17; public const int LOGIN_OK = 18; public const int LOGIN_FAIL = 19; public const int CONNECTED = 20; public const int IMALIVE=21;//心跳包 public const int REG_APPLY = 22; public const int OPR_SENDIP = 23; public const int ROOM_EXIT = 24; public const int OPR_UR_MASTER = 25;//你是房主 public const int OPR_START_GAME = 26;//进入游戏 public const int OPR_PREPARE = 27;//准备消息 public const int OPR_CAN_START = 28;//可以开始游戏 public const int REG_OK = 29; public const int REG_FAIL = 30; public const int OPR_FIRE = 31; public const int TYPE_TANK = 32; public const int TYPE_MISSILE = 33; public const int TYPE_BASE = 34; public const int TYPE_BLAST = 35; public const int OPR_STARTED = 36; #endregion 常量定义结束 public int roomNumber; public int clientID; public int operation; public int objType; public int objNumber; public int locationX; public int locationY; public int direction; public int addtionInt; public string addtionInfo;//额外信息,如发送的消息、ip地址等等 public int receiverID; public List<String> setValues; public string username; public string password; } }