Пример #1
0
        public byte[] ToByte()
        {
            List <byte> buf = new List <byte>();

            buf.AddRange(StringUTil.ToBytes(ModuleIp));
            return(buf.ToArray());
        }
Пример #2
0
        public byte[] ToByte()
        {
            List <byte> buf = new List <byte>();

            buf.Add((WaveSerializer as IByteConvertable).ToByte());
            buf.AddRange(StringUTil.ToBytes(FilePath));
            return(buf.ToArray());
        }
Пример #3
0
        public NetworkReceiver(byte[] bytes)
        {
            WaveSerializer = SerializerUtil.ToSerializer(bytes[0]);
            Port           = BitConverter.ToInt32(bytes, 4);
            var strByte = bytes.Where((x, i) => i > 7 && x != '\0').ToArray();

            ServerIp = StringUTil.ToString(strByte);
        }
Пример #4
0
        public byte[] ToByte()
        {
            List <byte> buf = new List <byte>();

            buf.Add((WaveSerializer as IByteConvertable).ToByte());
            buf.AddRange(new byte[3]);  //reserved bytes
            buf.AddRange(BitConverter.GetBytes(Port));
            buf.AddRange(StringUTil.ToBytes(ServerIp));
            return(buf.ToArray());
        }
Пример #5
0
 public FileRecoder(byte[] bytes)
 {
     WaveSerializer = SerializerUtil.ToSerializer(bytes[0]);
     FilePath       = StringUTil.ToString(bytes.Where((x, i) => i > 0).ToArray());
 }
Пример #6
0
 public VDPMReceiver(byte[] bytes)
 {
     //ModuleIp = StringUTil.ToString(bytes.Where((x, i) => i > 3).ToArray());
     ModuleIp = StringUTil.ToString(bytes);
 }
Пример #7
0
 public FileReceiver(byte[] bytes)
 {
     WaveSerializer = SerializerUtil.ToSerializer(bytes[0]);
     //FilePath = StringUTil.ToString(bytes.Where((x, i) => i > 4 && x != '\0').ToArray());
     FilePath = StringUTil.ToString(bytes.Where((x, i) => i > 0 && x != '\0').ToArray());
 }