//将TcP包的内容转换为byte public static byte[] Message2Byte(Authen_Message am) { return(ByteConvertHelper.Object2Bytes(am)); }
public static byte[] Message2Byte(TransCtrl_Message am) { return(ByteConvertHelper.Object2Bytes(am)); }
//将byte[]数据转换为TCP包 public static object Byte2Message(byte[] data, string messageType) { return(ByteConvertHelper.Bytes2Object(data, Type.GetType("Client_WPF." + messageType))); }