Exemplo n.º 1
0
 // Not using the localStream because this is the request-reply operation.
 public Stream DownloadStream()
 {
     log.Add("DownloadStream");
     FlowControlledStream stream = new FlowControlledStream();
     stream.StreamDuration = TimeSpan.FromSeconds(1);
     stream.ReadThrottle = TimeSpan.FromMilliseconds(500);
     return stream;
 }
Exemplo n.º 2
0
        // Not using the localStream because this is the request-reply operation.
        public Stream DownloadStream()
        {
            log.Add("DownloadStream");
            FlowControlledStream stream = new FlowControlledStream();

            stream.StreamDuration = TimeSpan.FromSeconds(1);
            stream.ReadThrottle   = TimeSpan.FromMilliseconds(500);
            return(stream);
        }
Exemplo n.º 3
0
        void PushStream(object state)
        {
            IPushCallback pushCallbackChannel = state as IPushCallback;

            localStream = new FlowControlledStream();
            localStream.ReadThrottle = TimeSpan.FromMilliseconds(800);

            pushCallbackChannel.ReceiveStream(localStream);
        }
Exemplo n.º 4
0
        public Stream DownloadCustomizedStream(TimeSpan readThrottle, TimeSpan streamDuration)
        {
            s_log.Add("DownloadStream");
            _localStream = new FlowControlledStream();
            _localStream.ReadThrottle   = readThrottle;
            _localStream.StreamDuration = streamDuration;

            return(_localStream);
        }
Exemplo n.º 5
0
        void PushStreamLongwait(object state)
        {
            IPushCallback pushCallbackChannel = state as IPushCallback;

            localStream = new FlowControlledStream();
            localStream.ReadThrottle   = TimeSpan.FromMilliseconds(3000);
            localStream.StreamDuration = TimeSpan.FromSeconds(2);

            try
            {
                pushCallbackChannel.ReceiveStreamWithException(localStream);
            }
            catch (Exception ex)
            {
                Console.WriteLine(String.Format("Server got the following exception: {0}", ex));
                this.exceptionstring = ex.GetType().Name;
            }
        }
Exemplo n.º 6
0
        public Stream DownloadCustomizedStream(TimeSpan readThrottle, TimeSpan streamDuration)
        {
            log.Add("DownloadStream");
            localStream = new FlowControlledStream();
            localStream.ReadThrottle = readThrottle;
            localStream.StreamDuration = streamDuration;

            return localStream;
        }
Exemplo n.º 7
0
        void PushStreamLongwait(object state)
        {
            IPushCallback pushCallbackChannel = state as IPushCallback;
            localStream = new FlowControlledStream();
            localStream.ReadThrottle = TimeSpan.FromMilliseconds(3000);
            localStream.StreamDuration = TimeSpan.FromSeconds(2);

            try
            {
                pushCallbackChannel.ReceiveStreamWithException(localStream);
            }
            catch (Exception ex)
            {
                Console.WriteLine(String.Format("Server got the following exception: {0}", ex));
                this.exceptionstring = ex.GetType().Name;
            }
        }
Exemplo n.º 8
0
        void PushStream(object state)
        {
            IPushCallback pushCallbackChannel = state as IPushCallback;
            localStream = new FlowControlledStream();
            localStream.ReadThrottle = TimeSpan.FromMilliseconds(800);

            pushCallbackChannel.ReceiveStream(localStream);
        }