Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / PeerInputChannelListener.cs / 1 / PeerInputChannelListener.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.ServiceModel; using System.Diagnostics; using System.Threading; using System.ServiceModel.Diagnostics; sealed class PeerInputChannelAcceptor : SingletonChannelAcceptor{ PeerNodeImplementation peerNode; PeerNodeImplementation.Registration registration; EndpointAddress localAddress; Uri via; PeerMessageDispatcher dispatcher = null; public PeerInputChannelAcceptor(PeerNodeImplementation peerNode, PeerNodeImplementation.Registration registration, ChannelManagerBase channelManager, EndpointAddress localAddress, Uri via) : base(channelManager) { this.registration = registration; this.peerNode = peerNode; this.localAddress = localAddress; this.via = via; PeerMessageDispatcher .PeerMessageQueueAdapter queueHandler = new PeerMessageDispatcher .PeerMessageQueueAdapter(this); dispatcher = new PeerMessageDispatcher (queueHandler, peerNode, ChannelManager, localAddress, via); } protected override PeerInputChannel OnCreateChannel() { return new PeerInputChannel(peerNode, registration, ChannelManager, localAddress, via); } protected override void OnTraceMessageReceived(Message message) { if (DiagnosticUtility.ShouldTraceInformation) { TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.MessageReceived, MessageTransmitTraceRecord.CreateReceiveTraceRecord(message), this, null); } } protected override void OnClose(TimeSpan timeout) { } protected override void OnClosing() { CloseDispatcher(); base.OnClosing(); } protected override void OnFaulted() { CloseDispatcher(); base.OnFaulted(); } void CloseDispatcher() { if(dispatcher != null) { dispatcher.Unregister(true); dispatcher = null; } } } sealed class PeerInputChannelListener : PeerChannelListener { PeerInputChannelAcceptor inputAcceptor; public PeerInputChannelListener(PeerTransportBindingElement bindingElement, BindingContext context, PeerResolver peerResolver) : base(bindingElement, context, peerResolver) { } protected override PeerInputChannelAcceptor ChannelAcceptor { get { return this.inputAcceptor; } } protected override void CreateAcceptor() { this.inputAcceptor = new PeerInputChannelAcceptor(this.InnerNode, this.Registration, this, new EndpointAddress(this.Uri), this.Uri); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TraceSwitch.cs
- TextEditorLists.cs
- Wizard.cs
- AuthenticatingEventArgs.cs
- MultiSelector.cs
- MimeMapping.cs
- Base64Decoder.cs
- DbConnectionFactory.cs
- ScrollEvent.cs
- SymmetricKeyWrap.cs
- RTLAwareMessageBox.cs
- StyleCollection.cs
- SegmentInfo.cs
- DATA_BLOB.cs
- ReferentialConstraint.cs
- Compiler.cs
- ADRoleFactoryConfiguration.cs
- ReferencedAssembly.cs
- QuadraticBezierSegment.cs
- DataSourceControlBuilder.cs
- TypeSystemHelpers.cs
- OrderablePartitioner.cs
- CursorConverter.cs
- MediaPlayer.cs
- ScopedKnownTypes.cs
- WebPartConnectVerb.cs
- EncoderExceptionFallback.cs
- SoapTypeAttribute.cs
- RenderData.cs
- BaseParser.cs
- RegisteredDisposeScript.cs
- SoapAttributes.cs
- peernodeimplementation.cs
- Stylus.cs
- WindowsButton.cs
- XmlChoiceIdentifierAttribute.cs
- SerializationEventsCache.cs
- PageBuildProvider.cs
- ConstructorNeedsTagAttribute.cs
- Pen.cs
- EntityAdapter.cs
- SoapFault.cs
- TileBrush.cs
- TextParagraphProperties.cs
- CheckBoxAutomationPeer.cs
- Menu.cs
- HostedHttpContext.cs
- SafeNativeMethodsMilCoreApi.cs
- ConfigXmlCDataSection.cs
- ImageMap.cs
- DiagnosticTrace.cs
- PropertyInfoSet.cs
- LiteralDesigner.cs
- TagNameToTypeMapper.cs
- WebBrowserNavigatedEventHandler.cs
- ProxyWebPartConnectionCollection.cs
- ExpandCollapseProviderWrapper.cs
- SQLChars.cs
- BitStack.cs
- ControlValuePropertyAttribute.cs
- MediaElement.cs
- TableCell.cs
- CompModHelpers.cs
- ResourceType.cs
- RtfControls.cs
- FileUpload.cs
- SetIterators.cs
- TextOnlyOutput.cs
- XmlnsDictionary.cs
- DataGridPagingPage.cs
- TagMapInfo.cs
- TracePayload.cs
- FormsAuthenticationConfiguration.cs
- base64Transforms.cs
- HostProtectionException.cs
- Rectangle.cs
- GlobalizationAssembly.cs
- HtmlTitle.cs
- DataGridViewTextBoxColumn.cs
- DataGridPagerStyle.cs
- ProcessProtocolHandler.cs
- ExtensionSurface.cs
- DesignerMetadata.cs
- ByteAnimationUsingKeyFrames.cs
- LostFocusEventManager.cs
- NamespaceInfo.cs
- TabletDeviceInfo.cs
- ProcessHostMapPath.cs
- ReflectPropertyDescriptor.cs
- Point4D.cs
- OracleDataReader.cs
- DataGridViewRow.cs
- SortableBindingList.cs
- XmlNavigatorStack.cs
- Native.cs
- CustomAssemblyResolver.cs
- Membership.cs
- EventSetterHandlerConverter.cs
- ImagingCache.cs
- DialogResultConverter.cs