void RespondToHello0(ICcpRemoteEndpoint clientEndpoint, ServerHello0Status status, byte[] cnonce0) { var response = new ServerHelloPacket0 { Status = status, Cnonce0 = cnonce0 }; var responseBytes = response.Encode(); _ccpTransport.SendPacket(clientEndpoint, responseBytes); }
public ServerHelloPacket0(byte[] udpData) { var reader = BinaryProcedures.CreateBinaryReader(udpData, 1); Flags = reader.ReadUInt16(); Status = (ServerHello0Status)reader.ReadByte(); Cnonce0 = BinaryProcedures.DecodeByteArray256(reader); if (Status == ServerHello0Status.OK) { StatefulProofOfWorkType = (StatefulProofOfWorkType)reader.ReadByte(); Snonce0 = BinaryProcedures.DecodeByteArray256(reader); } }