internal LocalChannelListener(BindingContext context) : base() { this.channelQueue = new InputQueue <IDuplexSessionChannel>(); this.uri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress); this.onAcceptChannelCallback = new Action(OnAcceptChannelCallback); }
protected override IDuplexSessionChannel OnCreateChannel(EndpointAddress remoteAddress, Uri via) { ValidateScheme(via); InputQueue <Message> forwardQueue = new InputQueue <Message>(); InputQueue <Message> reverseQueue = new InputQueue <Message>(); return(new ClientLocalDuplexSessionChannel(this, reverseQueue, forwardQueue, remoteAddress, via)); }
public static void ConnectServerChannel(InputQueue <Message> inputQueue, InputQueue <Message> outputQueue, EndpointAddress remoteAddress, Uri via, TimeSpan timeout) { LocalChannelListener channelListener; IDuplexSessionChannel serverChannel = CreateServerChannel (inputQueue, outputQueue, remoteAddress, via, out channelListener); channelListener.EnqueueNewChannel(serverChannel, timeout); }
public static IAsyncResult BeginConnectServerChannel(InputQueue <Message> inputQueue, InputQueue <Message> outputQueue, EndpointAddress remoteAddress, Uri via, TimeSpan timeout, AsyncCallback callback, object state) { LocalChannelListener channelListener; IDuplexSessionChannel serverChannel = CreateServerChannel (inputQueue, outputQueue, remoteAddress, via, out channelListener); return(channelListener.BeginEnqueueNewChannel(serverChannel, timeout, callback, state)); }
protected LocalDuplexSessionChannel(ChannelManagerBase channelManager, InputQueue <Message> receiveQueue, InputQueue <Message> sendQueue, EndpointAddress address, Uri via) : base(channelManager) { this.receiveQueue = receiveQueue; this.sendQueue = sendQueue; this.address = address; this.via = via; this.session = new LocalDuplexSession(this); this.onItemDequeued = new Action(OnItemDequeued); }
public AsyncQueueReader(InputQueue <T> inputQueue, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { if (inputQueue.AsyncCallbackGenerator != null) { base.VirtualCallback = inputQueue.AsyncCallbackGenerator(); } this.inputQueue = inputQueue; if (timeout != TimeSpan.MaxValue) { this.timer = new Timer(timerCallback, this, timeout, TimeSpan.FromMilliseconds(-1)); } }
static IDuplexSessionChannel CreateServerChannel(InputQueue <Message> inputQueue, InputQueue <Message> outputQueue, EndpointAddress remoteAddress, Uri via, out LocalChannelListener channelListener) { lock (routingTable) { if (!routingTable.TryGetValue(via, out channelListener)) { throw new EndpointNotFoundException(String.Format (ExceptionMessages.ChannelListenerNotFound, via.ToString())); } } return(new ServerLocalDuplexSessionChannel(channelListener, inputQueue, outputQueue, remoteAddress, via)); }
public WaitQueueReader(InputQueue <T> inputQueue) { this.inputQueue = inputQueue; waitEvent = new ManualResetEvent(false); }
internal ServerLocalDuplexSessionChannel(LocalChannelListener listener, InputQueue <Message> receiveQueue, InputQueue <Message> sendQueue, EndpointAddress address, Uri via) : base(listener, receiveQueue, sendQueue, address, via) { }
public ClientLocalDuplexSessionChannel(LocalChannelFactory factory, InputQueue <Message> receiveQueue, InputQueue <Message> sendQueue, EndpointAddress address, Uri via) : base(factory, receiveQueue, sendQueue, address, via) { }