A SEGMENT_INFO_MESSAGE is a request message sent by the client to the hosted cache containing the segment hash of data (HoD) for the previously offered segment, as well as the range of block hashes in the segment. Whether a SEGMENT_INFO_MESSAGE is sent depends on the hosted cache's response to the previous INITIAL_OFFER_MESSAGE containing the same HoHoDk.
        /// <summary>
        /// Convert the segmentInforMessage struct defined in adapter to stack
        /// </summary>
        /// <param name="segmentInforMessage">The segmentInforMessage message</param>
        /// <returns>Return the segmentInforMessage type defined in stack</returns>
        public static SEGMENT_INFO_MESSAGE ConvertToStackForSegmentInfoMsg(SegmentInfoMessage segmentInforMessage)
        {
            SEGMENT_INFO_MESSAGE segmentInforMessageStack;
            segmentInforMessageStack.ConnectionInfo = ConvertToStackForConnInfo(segmentInforMessage.ConnectionInfo);
            segmentInforMessageStack.ContentTag = segmentInforMessage.ContentTag;
            segmentInforMessageStack.MsgHeader = ConvertToStackForMsgHeader(segmentInforMessage.MsgHeader);
            segmentInforMessageStack.SegmentInfo = segmentInforMessage.SegmentInfo;

            return segmentInforMessageStack;
        }
        /// <summary>
        /// Convert the segmentInforMessage struct defined in adapter to stack
        /// </summary>
        /// <param name="segmentInforMessage">The segmentInforMessage message</param>
        /// <returns>Return the segmentInforMessage type defined in stack</returns>
        public static SEGMENT_INFO_MESSAGE ConvertToStackForSegmentInfoMsg(SegmentInfoMessage segmentInforMessage)
        {
            SEGMENT_INFO_MESSAGE segmentInforMessageStack;

            segmentInforMessageStack.ConnectionInfo = ConvertToStackForConnInfo(segmentInforMessage.ConnectionInfo);
            segmentInforMessageStack.ContentTag     = segmentInforMessage.ContentTag;
            segmentInforMessageStack.MsgHeader      = ConvertToStackForMsgHeader(segmentInforMessage.MsgHeader);
            segmentInforMessageStack.SegmentInfo    = segmentInforMessage.SegmentInfo;

            return(segmentInforMessageStack);
        }
        /// <summary>
        /// Receive a SegmentInfoMessage from the Client.
        /// </summary>
        /// <param name="timeout">Waiting for specified timeout to receive the specified request.</param>
        /// <returns>Return the reveived SegmentInfoMessage.</returns>
        public SegmentInfoMessage ExpectSegmentInfoMessage(TimeSpan timeout)
        {
            try
            {
                SEGMENT_INFO_MESSAGE segmentInfoMsgStack = this.pchcServer.ExpectSegmentInfoMessage(
                    this.GetProperty("Environment.SecondContentClient.IPAddress"),
                    timeout);

                this.ValidateSegmentInfoMessage(
                    segmentInfoMsgStack,
                    this.GetProperty("Environment.SecondContentClient.OSVersion"));

                PchcBothRoleCaptureCode.ValidateTransport(this.pchcServer.HttpRequestUri.Scheme);
                this.ValidateTransport(this.pchcServer.HttpRequestMethod);

                SegmentInfoMessage segmentInfoMsg = ClientHelper.ConvertFromStackForSegmentInfoMsg(segmentInfoMsgStack);
                return(segmentInfoMsg);
            }
            catch (NoSEGMENTINFOMESSAGEReceivedException e)
            {
                throw new NoSegmentInfoMessageException(e.Message);
            }
        }