Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TdsParserHelperClasses.cs
- NativeMethods.cs
- IsolationInterop.cs
- MatrixAnimationUsingKeyFrames.cs
- RsaSecurityKey.cs
- RunInstallerAttribute.cs
- NameTable.cs
- QilBinary.cs
- BamlTreeMap.cs
- EditorPart.cs
- MarkupExtensionParser.cs
- MachinePropertyVariants.cs
- PermissionToken.cs
- Rotation3D.cs
- webclient.cs
- PropagatorResult.cs
- StorageMappingItemCollection.cs
- DuplexChannel.cs
- XmlQualifiedName.cs
- ListViewAutomationPeer.cs
- DataControlField.cs
- PermissionRequestEvidence.cs
- QuerySelectOp.cs
- Funcletizer.cs
- EntityKeyElement.cs
- FontFaceLayoutInfo.cs
- SmtpNtlmAuthenticationModule.cs
- DefaultBindingPropertyAttribute.cs
- SafeFileHandle.cs
- IisTraceWebEventProvider.cs
- PointConverter.cs
- ScrollItemProviderWrapper.cs
- ThousandthOfEmRealDoubles.cs
- ToolStripContentPanelRenderEventArgs.cs
- Assembly.cs
- BooleanAnimationBase.cs
- MethodCallTranslator.cs
- TdsParser.cs
- InvalidOleVariantTypeException.cs
- DataGridViewElement.cs
- CurrencyManager.cs
- ProgressBarBrushConverter.cs
- OdbcConnectionStringbuilder.cs
- DocumentReference.cs
- StackSpiller.Temps.cs
- WebProxyScriptElement.cs
- ConnectivityStatus.cs
- HttpCacheParams.cs
- PenLineCapValidation.cs
- DSASignatureFormatter.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- GridSplitterAutomationPeer.cs
- QilXmlReader.cs
- HttpCapabilitiesSectionHandler.cs
- ThreadPool.cs
- ConstructorBuilder.cs
- FixedSOMPage.cs
- StylusEventArgs.cs
- ReturnType.cs
- KeyFrames.cs
- KeyConverter.cs
- ControlSerializer.cs
- StringWriter.cs
- StateItem.cs
- ListViewInsertedEventArgs.cs
- SqlConnectionStringBuilder.cs
- ThrowHelper.cs
- ServerIdentity.cs
- DataRecord.cs
- NativeCppClassAttribute.cs
- RepeaterCommandEventArgs.cs
- InfoCardRequestException.cs
- AsmxEndpointPickerExtension.cs
- EmptyQuery.cs
- UnicodeEncoding.cs
- StateChangeEvent.cs
- ServicePointManager.cs
- EllipticalNodeOperations.cs
- DetailsViewModeEventArgs.cs
- ResetableIterator.cs
- ExpressionServices.cs
- SafeRightsManagementPubHandle.cs
- CompilerTypeWithParams.cs
- ColumnCollection.cs
- VirtualPathProvider.cs
- BridgeDataReader.cs
- SqlCacheDependencyDatabaseCollection.cs
- FrugalList.cs
- TablePatternIdentifiers.cs
- WebCategoryAttribute.cs
- MatrixIndependentAnimationStorage.cs
- Win32MouseDevice.cs
- StringUtil.cs
- MsmqAppDomainProtocolHandler.cs
- InvokeMemberBinder.cs
- TransportChannelListener.cs
- DataGridViewCellStyleConverter.cs
- WizardStepBase.cs
- PassportAuthentication.cs
- Vector3DAnimationBase.cs