Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Net / System / Net / Sockets / MulticastOption.cs / 1 / MulticastOption.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; ////// public class MulticastOption { IPAddress group; IPAddress localAddress; int ifIndex; ////// Contains option values /// for IP multicast packets. /// ////// public MulticastOption(IPAddress group, IPAddress mcint) { if (group == null) { throw new ArgumentNullException("group"); } if (mcint == null) { throw new ArgumentNullException("mcint"); } Group = group; LocalAddress = mcint; } public MulticastOption(IPAddress group, int interfaceIndex) { if (group == null) { throw new ArgumentNullException("group"); } if ( interfaceIndex < 0 || interfaceIndex > 0x00FFFFFF ) { throw new ArgumentOutOfRangeException("interfaceIndex"); } #if !FEATURE_PAL if (!ComNetOS.IsPostWin2K){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } #endif // !FEATURE_PAL Group = group; ifIndex = interfaceIndex; } ////// Creates a new instance of the MulticaseOption class with the specified IP /// address group and local address. /// ////// public MulticastOption(IPAddress group) { if (group == null) { throw new ArgumentNullException("group"); } Group = group; LocalAddress = IPAddress.Any; } ////// Creates a new version of the MulticastOption class for the specified /// group. /// ////// public IPAddress Group { get { return group; } set { group = value; } } ////// Sets the IP address of a multicast group. /// ////// public IPAddress LocalAddress { get { return localAddress; } set { ifIndex = 0; localAddress = value; } } public int InterfaceIndex { get { return ifIndex; } set { if ( value < 0 || value > 0x00FFFFFF ) { throw new ArgumentOutOfRangeException("value"); } #if !FEATURE_PAL if (!ComNetOS.IsPostWin2K){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } #endif // !FEATURE_PAL localAddress = null; ifIndex = value; } } } // class MulticastOption ////// Sets the local address of a multicast group. /// ////// public class IPv6MulticastOption { IPAddress m_Group; long m_Interface; ////// Contains option values for joining an IPv6 multicast group. /// ////// public IPv6MulticastOption(IPAddress group, long ifindex) { if (group == null) { throw new ArgumentNullException("group"); } if ( ifindex < 0 || ifindex > 0x00000000FFFFFFFF ) { throw new ArgumentOutOfRangeException("ifindex"); } Group = group; InterfaceIndex = ifindex; } ////// Creates a new instance of the MulticaseOption class with the specified IP /// address group and local address. /// ////// public IPv6MulticastOption(IPAddress group) { if (group == null) { throw new ArgumentNullException("group"); } Group = group; InterfaceIndex = 0; } ////// Creates a new version of the MulticastOption class for the specified /// group. /// ////// public IPAddress Group { get { return m_Group; } set { if (value == null) { throw new ArgumentNullException("value"); } m_Group = value; } } ////// Sets the IP address of a multicast group. /// ////// public long InterfaceIndex { get { return m_Interface; } set { if ( value < 0 || value > 0x00000000FFFFFFFF ) { throw new ArgumentOutOfRangeException("value"); } m_Interface = value; } } } // class MulticastOptionIPv6 } // namespace System.Net.Sockets // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Sets the interface index. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; ////// public class MulticastOption { IPAddress group; IPAddress localAddress; int ifIndex; ////// Contains option values /// for IP multicast packets. /// ////// public MulticastOption(IPAddress group, IPAddress mcint) { if (group == null) { throw new ArgumentNullException("group"); } if (mcint == null) { throw new ArgumentNullException("mcint"); } Group = group; LocalAddress = mcint; } public MulticastOption(IPAddress group, int interfaceIndex) { if (group == null) { throw new ArgumentNullException("group"); } if ( interfaceIndex < 0 || interfaceIndex > 0x00FFFFFF ) { throw new ArgumentOutOfRangeException("interfaceIndex"); } #if !FEATURE_PAL if (!ComNetOS.IsPostWin2K){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } #endif // !FEATURE_PAL Group = group; ifIndex = interfaceIndex; } ////// Creates a new instance of the MulticaseOption class with the specified IP /// address group and local address. /// ////// public MulticastOption(IPAddress group) { if (group == null) { throw new ArgumentNullException("group"); } Group = group; LocalAddress = IPAddress.Any; } ////// Creates a new version of the MulticastOption class for the specified /// group. /// ////// public IPAddress Group { get { return group; } set { group = value; } } ////// Sets the IP address of a multicast group. /// ////// public IPAddress LocalAddress { get { return localAddress; } set { ifIndex = 0; localAddress = value; } } public int InterfaceIndex { get { return ifIndex; } set { if ( value < 0 || value > 0x00FFFFFF ) { throw new ArgumentOutOfRangeException("value"); } #if !FEATURE_PAL if (!ComNetOS.IsPostWin2K){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } #endif // !FEATURE_PAL localAddress = null; ifIndex = value; } } } // class MulticastOption ////// Sets the local address of a multicast group. /// ////// public class IPv6MulticastOption { IPAddress m_Group; long m_Interface; ////// Contains option values for joining an IPv6 multicast group. /// ////// public IPv6MulticastOption(IPAddress group, long ifindex) { if (group == null) { throw new ArgumentNullException("group"); } if ( ifindex < 0 || ifindex > 0x00000000FFFFFFFF ) { throw new ArgumentOutOfRangeException("ifindex"); } Group = group; InterfaceIndex = ifindex; } ////// Creates a new instance of the MulticaseOption class with the specified IP /// address group and local address. /// ////// public IPv6MulticastOption(IPAddress group) { if (group == null) { throw new ArgumentNullException("group"); } Group = group; InterfaceIndex = 0; } ////// Creates a new version of the MulticastOption class for the specified /// group. /// ////// public IPAddress Group { get { return m_Group; } set { if (value == null) { throw new ArgumentNullException("value"); } m_Group = value; } } ////// Sets the IP address of a multicast group. /// ////// public long InterfaceIndex { get { return m_Interface; } set { if ( value < 0 || value > 0x00000000FFFFFFFF ) { throw new ArgumentOutOfRangeException("value"); } m_Interface = value; } } } // class MulticastOptionIPv6 } // namespace System.Net.Sockets // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Sets the interface index. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlCharCheckingWriter.cs
- EntityDataSourceValidationException.cs
- UnsafeNativeMethods.cs
- MimeTypeMapper.cs
- ValidationHelpers.cs
- RuntimeHandles.cs
- RuntimeHandles.cs
- SqlUdtInfo.cs
- URL.cs
- PreservationFileReader.cs
- HierarchicalDataBoundControlAdapter.cs
- OrthographicCamera.cs
- DragStartedEventArgs.cs
- UpWmlPageAdapter.cs
- PreProcessInputEventArgs.cs
- DataGridViewRowEventArgs.cs
- HttpCachePolicyWrapper.cs
- AxisAngleRotation3D.cs
- TargetControlTypeCache.cs
- ContractCodeDomInfo.cs
- MultiByteCodec.cs
- Renderer.cs
- DynamicPropertyHolder.cs
- PathFigureCollectionConverter.cs
- RtfToXamlLexer.cs
- _BaseOverlappedAsyncResult.cs
- DoubleStorage.cs
- PointConverter.cs
- WebPartMinimizeVerb.cs
- UriScheme.cs
- FileDialog_Vista.cs
- MetadataCacheItem.cs
- PropertyChangedEventArgs.cs
- ConnectionStringsExpressionBuilder.cs
- DbProviderConfigurationHandler.cs
- SiblingIterators.cs
- ErrorFormatterPage.cs
- Figure.cs
- Avt.cs
- ContentElementAutomationPeer.cs
- TableLayoutPanelCodeDomSerializer.cs
- NumericPagerField.cs
- HitTestResult.cs
- DataGridTextBox.cs
- QuaternionAnimation.cs
- SystemColors.cs
- TargetFrameworkAttribute.cs
- _NtlmClient.cs
- EdmProperty.cs
- SQLMembershipProvider.cs
- XmlQueryTypeFactory.cs
- ACE.cs
- Trace.cs
- BindingSource.cs
- ChameleonKey.cs
- DataGridViewBand.cs
- SystemWebCachingSectionGroup.cs
- HierarchicalDataTemplate.cs
- SBCSCodePageEncoding.cs
- LayoutEditorPart.cs
- ToolStripControlHost.cs
- BooleanExpr.cs
- TokenizerHelper.cs
- XmlDigitalSignatureProcessor.cs
- RuntimeEnvironment.cs
- DesignerCapabilities.cs
- RbTree.cs
- MenuCommand.cs
- ExpandSegmentCollection.cs
- ScrollContentPresenter.cs
- DesignerDataConnection.cs
- DataControlPagerLinkButton.cs
- BamlRecords.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- DefaultProxySection.cs
- TogglePattern.cs
- ContractMapping.cs
- MasterPageBuildProvider.cs
- OletxCommittableTransaction.cs
- ModuleBuilder.cs
- TextMetrics.cs
- StyleSelector.cs
- ToolStripItemImageRenderEventArgs.cs
- PropertyNames.cs
- SuppressMessageAttribute.cs
- DeploymentSection.cs
- ThreadSafeList.cs
- XmlUtil.cs
- DetectEofStream.cs
- UserControl.cs
- WebPartCatalogAddVerb.cs
- CFStream.cs
- SubpageParaClient.cs
- UIElement3D.cs
- PersonalizationEntry.cs
- SqlMethodTransformer.cs
- ResolveCriteriaCD1.cs
- UnsafePeerToPeerMethods.cs
- PopupControlService.cs
- ThreadPool.cs