void TransparentStreamSetReadTimeoutRequestMessageReceived(TransparentStreamMessageBase transparentStreamMessageBase)
        {
            TransparentStreamSetReadTimeoutRequestMessage request = (TransparentStreamSetReadTimeoutRequestMessage)transparentStreamMessageBase;
            Exception exception = null;

            try {
                baseStream.ReadTimeout = request.ReadTimeout;
            } catch (Exception ex) {
                exception = ex;
            }
            objectBusSession.SendMessage(new TransparentStreamSetReadTimeoutResponseMessage(streamID, request.ID, exception));
        }
Пример #2
0
		public IAsyncResult BeginSetReadTimeout (int value)
		{
			TransparentStreamSetReadTimeoutRequestMessage request = new TransparentStreamSetReadTimeoutRequestMessage (Guid.NewGuid (), streamID, value);
			TransparentStreamAsyncResult result = new TransparentStreamAsyncResult (null);
			if (!pendingSetReadTimeoutRequests.TryAdd (request.ID, result)) {
				throw new Exception ("request failed before sending.");
			}
			objectBusSession.SendMessage (request);
			return result;
		}