public byte[] ToByte() { List <byte> buf = new List <byte>(); buf.AddRange(StringUTil.ToBytes(ModuleIp)); return(buf.ToArray()); }
public byte[] ToByte() { List <byte> buf = new List <byte>(); buf.Add((WaveSerializer as IByteConvertable).ToByte()); buf.AddRange(StringUTil.ToBytes(FilePath)); return(buf.ToArray()); }
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); }
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()); }
public FileRecoder(byte[] bytes) { WaveSerializer = SerializerUtil.ToSerializer(bytes[0]); FilePath = StringUTil.ToString(bytes.Where((x, i) => i > 0).ToArray()); }
public VDPMReceiver(byte[] bytes) { //ModuleIp = StringUTil.ToString(bytes.Where((x, i) => i > 3).ToArray()); ModuleIp = StringUTil.ToString(bytes); }
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()); }