Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / Sockets / IPPacketInformation.cs / 1 / IPPacketInformation.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; public struct IPPacketInformation { IPAddress address; int networkInterface; internal IPPacketInformation(IPAddress address, int networkInterface){ this.address = address; this.networkInterface = networkInterface; } public IPAddress Address { get{ return address; } } public int Interface { get{ return networkInterface; } } public static bool operator == (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return packetInformation1.Equals(packetInformation2); } public static bool operator != (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return !packetInformation1.Equals(packetInformation2); } public override bool Equals(object comparand) { if ((object) comparand == null) { return false; } if (!(comparand is IPPacketInformation)) return false; IPPacketInformation obj = (IPPacketInformation) comparand; if (address.Equals(obj.address) && networkInterface == obj.networkInterface) return (true); return false; } public override int GetHashCode() { return address.GetHashCode() + networkInterface.GetHashCode(); } }; // enum SocketFlags } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; public struct IPPacketInformation { IPAddress address; int networkInterface; internal IPPacketInformation(IPAddress address, int networkInterface){ this.address = address; this.networkInterface = networkInterface; } public IPAddress Address { get{ return address; } } public int Interface { get{ return networkInterface; } } public static bool operator == (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return packetInformation1.Equals(packetInformation2); } public static bool operator != (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return !packetInformation1.Equals(packetInformation2); } public override bool Equals(object comparand) { if ((object) comparand == null) { return false; } if (!(comparand is IPPacketInformation)) return false; IPPacketInformation obj = (IPPacketInformation) comparand; if (address.Equals(obj.address) && networkInterface == obj.networkInterface) return (true); return false; } public override int GetHashCode() { return address.GetHashCode() + networkInterface.GetHashCode(); } }; // enum SocketFlags } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlDataSourceView.cs
- DataGridViewCheckBoxCell.cs
- _NativeSSPI.cs
- List.cs
- ScriptMethodAttribute.cs
- ISAPIApplicationHost.cs
- TextEditorContextMenu.cs
- SQLBinaryStorage.cs
- FormsAuthenticationModule.cs
- MetafileHeaderWmf.cs
- DocumentApplicationDocumentViewer.cs
- OutputScopeManager.cs
- CommonProperties.cs
- XmlSchemaRedefine.cs
- StringToken.cs
- BaseDataList.cs
- CDSCollectionETWBCLProvider.cs
- DataGridCell.cs
- DataRelationCollection.cs
- InputEventArgs.cs
- MsdtcClusterUtils.cs
- ArrayList.cs
- DocumentPageTextView.cs
- EventLogTraceListener.cs
- ArglessEventHandlerProxy.cs
- HttpFileCollection.cs
- WindowsFormsHost.cs
- DictionarySurrogate.cs
- SharedPersonalizationStateInfo.cs
- HoistedLocals.cs
- BaseUriWithWildcard.cs
- NameValuePermission.cs
- ValuePatternIdentifiers.cs
- SessionEndingCancelEventArgs.cs
- Pen.cs
- Image.cs
- SqlBooleanizer.cs
- ValidatedControlConverter.cs
- ServicePoint.cs
- ToolboxCategoryItems.cs
- StorageComplexTypeMapping.cs
- TextFormatterImp.cs
- LifetimeServices.cs
- SerializationInfoEnumerator.cs
- TextEndOfLine.cs
- TrailingSpaceComparer.cs
- HtmlElementCollection.cs
- SubMenuStyleCollection.cs
- HandledMouseEvent.cs
- GridItemCollection.cs
- Cloud.cs
- OutputScopeManager.cs
- PointIndependentAnimationStorage.cs
- DataGridViewLinkCell.cs
- Domain.cs
- SqlInfoMessageEvent.cs
- ScrollEvent.cs
- ErrorWebPart.cs
- ActivityTypeDesigner.xaml.cs
- ForeignKeyFactory.cs
- StringPropertyBuilder.cs
- AuthenticationModuleElementCollection.cs
- TemplateApplicationHelper.cs
- CompilerInfo.cs
- AssemblyHash.cs
- TabControl.cs
- BreakSafeBase.cs
- WinFormsComponentEditor.cs
- OpenTypeLayoutCache.cs
- BindingCollectionElement.cs
- BulletedListEventArgs.cs
- TokenBasedSet.cs
- CounterCreationDataCollection.cs
- LassoSelectionBehavior.cs
- LateBoundBitmapDecoder.cs
- ReflectionTypeLoadException.cs
- DataGridViewLayoutData.cs
- XmlWellformedWriter.cs
- MetadataCache.cs
- DoubleAnimationUsingKeyFrames.cs
- SystemDropShadowChrome.cs
- GrammarBuilderRuleRef.cs
- DataSourceHelper.cs
- SplitterCancelEvent.cs
- Base64Encoder.cs
- RsaSecurityTokenParameters.cs
- MessageQueueKey.cs
- PropertyDescriptorGridEntry.cs
- NativeMethods.cs
- TakeQueryOptionExpression.cs
- TextParaLineResult.cs
- XhtmlStyleClass.cs
- Label.cs
- MachineKeyValidationConverter.cs
- EntityViewGenerator.cs
- Button.cs
- DataStreams.cs
- LocalBuilder.cs
- CommonRemoteMemoryBlock.cs
- RoleManagerEventArgs.cs