/// <summary> /// Read a frame from the socket and send it to the beacon channel /// </summary> /// <param name="c2"></param> /// <returns></returns> public bool ReadAndSendTo(IC2Channel c2) { var buffer = ReadFrame(); //if (buffer.Length <= 0) return false; c2.SendFrame(buffer); return(true); }
/// <summary> /// Reads a frame from the NamedPipe and sends it to the other C2 channel /// </summary> /// <param name="c2"></param> /// <returns>Whether the read/send were successful</returns> public bool ReadAndSendTo(IC2Channel c2) { var buffer = ReadFrame(); if (buffer.Length <= 0) { return(false); } if (ExternalId == 0 && buffer.Length == 132) { ExtractId(buffer); } c2.SendFrame(buffer); return(true); }