Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Activation / HostedTcpTransportManager.cs / 1 / HostedTcpTransportManager.cs
//----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------
namespace System.ServiceModel.Activation
{
using System.ServiceModel.Channels;
using System.Collections.Generic;
using System.Diagnostics;
class HostedTcpTransportManager : SharedTcpTransportManager
{
bool settingsApplied;
OnViaDelegate onViaCallback;
public HostedTcpTransportManager(BaseUriWithWildcard baseAddress)
: base(baseAddress.BaseAddress)
{
this.HostNameComparisonMode = baseAddress.HostNameComparisonMode;
this.onViaCallback = new OnViaDelegate(OnVia);
}
internal void Start(int queueId, Guid token, MessageReceivedCallback messageReceivedCallback)
{
SetMessageReceivedCallback(messageReceivedCallback);
OnOpenInternal(queueId, token);
}
internal override void OnOpen()
{
// This is intentionally empty.
}
internal void Stop()
{
CleanUp();
settingsApplied = false;
}
protected override OnViaDelegate GetOnViaCallback()
{
return this.onViaCallback;
}
void OnVia(Uri address)
{
Debug.Print("HostedTcpTransportManager.OnVia() address: " + address + " calling EnsureServiceAvailable()");
ServiceHostingEnvironment.EnsureServiceAvailable(address.LocalPath);
}
protected override void OnSelecting(TcpChannelListener channelListener)
{
if (settingsApplied)
{
return;
}
lock (ThisLock)
{
if (settingsApplied)
{
// Use the first one.
return;
}
this.ApplyListenerSettings(channelListener);
settingsApplied = true;
}
}
}
}
// 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
- HttpPostProtocolReflector.cs
- DecoderBestFitFallback.cs
- CommandHelpers.cs
- _AuthenticationState.cs
- PatternMatcher.cs
- ProfileProvider.cs
- ProcessThreadCollection.cs
- ArrayConverter.cs
- CompoundFileStreamReference.cs
- DataGrid.cs
- NumberFormatInfo.cs
- AdornerPresentationContext.cs
- TranslateTransform.cs
- baseshape.cs
- ExpandedWrapper.cs
- PerformanceCounter.cs
- State.cs
- DiscriminatorMap.cs
- DynamicRenderer.cs
- TemplatePagerField.cs
- ConditionalExpression.cs
- CompositeTypefaceMetrics.cs
- FormViewUpdateEventArgs.cs
- AuthorizationRule.cs
- StringExpressionSet.cs
- GeneralTransform.cs
- DynamicValidatorEventArgs.cs
- SynchronizationLockException.cs
- DbConnectionPool.cs
- ViewValidator.cs
- ToolStripInSituService.cs
- RootDesignerSerializerAttribute.cs
- ColorInterpolationModeValidation.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- TextReader.cs
- OracleEncoding.cs
- DesignerHelpers.cs
- DataGridViewBand.cs
- AsymmetricSecurityBindingElement.cs
- RectAnimation.cs
- KeyValuePair.cs
- Grid.cs
- MeshGeometry3D.cs
- DoubleLink.cs
- CheckPair.cs
- DBSchemaTable.cs
- FileDialogCustomPlaces.cs
- X509Utils.cs
- ArraySortHelper.cs
- ContentElementCollection.cs
- IpcPort.cs
- X500Name.cs
- DefaultExpression.cs
- NumberFormatInfo.cs
- ThemeInfoAttribute.cs
- TextRangeProviderWrapper.cs
- IdentifierCreationService.cs
- CommandExpr.cs
- ServiceThrottlingBehavior.cs
- DirectoryObjectSecurity.cs
- UiaCoreProviderApi.cs
- RemoteWebConfigurationHostStream.cs
- WinEventHandler.cs
- DataProtection.cs
- SizeF.cs
- User.cs
- EnumValAlphaComparer.cs
- XamlToRtfWriter.cs
- XhtmlBasicImageAdapter.cs
- DataServices.cs
- CompareValidator.cs
- StaticContext.cs
- QueryOperator.cs
- DataError.cs
- ValidationErrorCollection.cs
- NameValuePair.cs
- DbgUtil.cs
- MenuEventArgs.cs
- LocalizeDesigner.cs
- StrongNameUtility.cs
- GeometryDrawing.cs
- PageContent.cs
- GroupStyle.cs
- SerialReceived.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- ProfilePropertyNameValidator.cs
- CatalogPartCollection.cs
- DataGridPageChangedEventArgs.cs
- _ConnectOverlappedAsyncResult.cs
- AuthenticationManager.cs
- ShaderEffect.cs
- ContextMenuService.cs
- DataServiceBehavior.cs
- GPPOINTF.cs
- ExpandCollapseProviderWrapper.cs
- UIntPtr.cs
- TrustLevel.cs
- ApplicationInterop.cs
- XPathChildIterator.cs
- documentsequencetextcontainer.cs