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
- XmlAttributeHolder.cs
- Marshal.cs
- ActivityExecutionWorkItem.cs
- DataRowChangeEvent.cs
- Int64Animation.cs
- FileInfo.cs
- ConnectionManagementElement.cs
- ScrollViewer.cs
- TextBox.cs
- ListBoxAutomationPeer.cs
- CodeCompiler.cs
- ProtocolsSection.cs
- Pkcs7Signer.cs
- CollectionBuilder.cs
- CompModHelpers.cs
- DataGridViewRowsAddedEventArgs.cs
- webclient.cs
- EncryptedHeaderXml.cs
- ControlEvent.cs
- ApplicationSecurityInfo.cs
- HttpResponse.cs
- FrameworkContentElement.cs
- HostingEnvironmentWrapper.cs
- MasterPageParser.cs
- ObjectDisposedException.cs
- GetLedgerRequest.cs
- WCFBuildProvider.cs
- UIAgentAsyncParams.cs
- TextTreeText.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ExecutorLocksHeldException.cs
- Vector.cs
- MediaScriptCommandRoutedEventArgs.cs
- DrawingDrawingContext.cs
- HwndHostAutomationPeer.cs
- CalendarKeyboardHelper.cs
- Internal.cs
- XmlSchemaComplexContentRestriction.cs
- InternalPermissions.cs
- UnsafeNativeMethods.cs
- WebPartManagerInternals.cs
- Membership.cs
- CultureInfoConverter.cs
- ExtenderProvidedPropertyAttribute.cs
- AssemblyCollection.cs
- ConfigurationLocation.cs
- TagPrefixInfo.cs
- UIElement3D.cs
- PersistChildrenAttribute.cs
- TextTreeInsertElementUndoUnit.cs
- ProxySimple.cs
- RegistryKey.cs
- TextBoxBase.cs
- FrameworkContextData.cs
- XhtmlConformanceSection.cs
- AnnotationAuthorChangedEventArgs.cs
- SmtpFailedRecipientException.cs
- EncodingTable.cs
- CultureTableRecord.cs
- GorillaCodec.cs
- ContainerSelectorGlyph.cs
- TimeSpanValidator.cs
- mactripleDES.cs
- EventProviderWriter.cs
- StringUtil.cs
- IWorkflowDebuggerService.cs
- HeaderedContentControl.cs
- OrderedDictionary.cs
- XPathNodeHelper.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- InvalidCastException.cs
- EventListener.cs
- MSG.cs
- XmlSchemaObject.cs
- ProcessThreadCollection.cs
- WebPartZoneBase.cs
- RotateTransform3D.cs
- ContentElement.cs
- FillErrorEventArgs.cs
- Operators.cs
- TextRange.cs
- webeventbuffer.cs
- SelectionPattern.cs
- JsonClassDataContract.cs
- ByteAnimationUsingKeyFrames.cs
- TextAdaptor.cs
- ManipulationDevice.cs
- MetadataItemEmitter.cs
- WmiEventSink.cs
- ProfileModule.cs
- QuaternionKeyFrameCollection.cs
- CellLabel.cs
- EncryptedType.cs
- TryCatchDesigner.xaml.cs
- MemberDomainMap.cs
- SoapDocumentServiceAttribute.cs
- EmbeddedMailObject.cs
- XmlFormatReaderGenerator.cs
- ConsumerConnectionPoint.cs
- DiscardableAttribute.cs