Example #1
0
 private static void OnServerStop(Client client, PacketReader reader)
 {
     MessageBox.Show("服务器关闭");
     try
     {
         client.Close(true);
     }
     catch { }
     client.ServerStop();
 }
Example #2
0
        private static void OnError(Client client, PacketReader reader){
			//错误
			string err = reader.ReadUnicode(256);
         //   int code = reader.ReadByte();
			MessageBox.Show(err);
			//if(!client.IsLogin){
				try{
					client.Close(client.IsLogin);
				}catch{}
			//}
		}