namespace UniScan.Network.Protocol.PayloadPart;
///
/// A payload part containing a Request ID
///
public interface IRequestIdPayloadPart
{
///
/// Used as a way to know what the server is responding to
///
///
///
/// When a packet is received by the server with a RequestId, assuming the packet supports it, the server will echo back the same RequestId in its response.
///
/// The client is to attach a request ID and a special handler on send, when the client receives a packet with the same request id, the handler will handle it.
///
Guid? RequestId { get; }
}
///
/// Adds a RequestId that the packet will hold when responding to a request
///
public interface IResponsePayloadPart : IRequestIdPayloadPart;
///
/// Adds a RequestId that the server will echo back in the response packet(s)
///
/// The expected response type from the server
///
public interface IRequestPayloadPart : IRequestIdPayloadPart
where TResponse : IPacket, IResponsePayloadPart;