Beispiel #1
0
        /// <summary>
        /// Sends a ChannelStreamingStart message to a producer.
        /// </summary>
        /// <param name="channelStreamingInfos">The list of <see cref="ChannelStreamingInfo" /> objects.</param>
        /// <returns>The sent message on success; <c>null</c> otherwise.</returns>
        public virtual EtpMessage <ChannelStreamingStart> ChannelStreamingStart(IList <ChannelStreamingInfo> channelStreamingInfos)
        {
            var body = new ChannelStreamingStart()
            {
                Channels = channelStreamingInfos ?? new List <ChannelStreamingInfo>()
            };

            return(SendRequest(body));
        }
        /// <summary>
        /// Sends a ChannelStreamingStart message to a producer.
        /// </summary>
        /// <param name="channelStreamingInfos">The list of <see cref="ChannelStreamingInfo" /> objects.</param>
        /// <returns>The message identifier.</returns>
        public virtual long ChannelStreamingStart(IList <ChannelStreamingInfo> channelStreamingInfos)
        {
            var header = CreateMessageHeader(Protocols.ChannelStreaming, MessageTypes.ChannelStreaming.ChannelStreamingStart);

            var channelStreamingStart = new ChannelStreamingStart()
            {
                Channels = channelStreamingInfos
            };

            return(Session.SendMessage(header, channelStreamingStart));
        }
 /// <summary>
 /// Handles the ChannelStreamingStart message from a consumer.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="channelStreamingStart">The ChannelStreamingStart message.</param>
 protected virtual void HandleChannelStreamingStart(IMessageHeader header, ChannelStreamingStart channelStreamingStart)
 {
     Notify(OnChannelStreamingStart, header, channelStreamingStart);
 }