Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Sockets / SocketInformation.cs / 1305376 / SocketInformation.cs
using System.Runtime.Serialization; namespace System.Net.Sockets { [Serializable] public struct SocketInformation{ byte[] protocolInformation; SocketInformationOptions options; [OptionalField] EndPoint remoteEndPoint; public byte[] ProtocolInformation{ get{ return protocolInformation; } set{ protocolInformation = value; } } public SocketInformationOptions Options{ get{ return options; } set{ options = value; } } internal bool IsNonBlocking{ get{ return ((options&SocketInformationOptions.NonBlocking)!=0); } set{ if(value){ options |= SocketInformationOptions.NonBlocking; } else{ options &= ~SocketInformationOptions.NonBlocking; } } } internal bool IsConnected{ get{ return ((options&SocketInformationOptions.Connected)!=0); } set{ if(value){ options |= SocketInformationOptions.Connected; } else{ options &= ~SocketInformationOptions.Connected; } } } internal bool IsListening{ get{ return ((options&SocketInformationOptions.Listening)!=0); } set{ if(value){ options |= SocketInformationOptions.Listening; } else{ options &= ~SocketInformationOptions.Listening; } } } internal bool UseOnlyOverlappedIO{ get{ return ((options&SocketInformationOptions.UseOnlyOverlappedIO)!=0); } set{ if(value){ options |= SocketInformationOptions.UseOnlyOverlappedIO; } else{ options &= ~SocketInformationOptions.UseOnlyOverlappedIO; } } } internal EndPoint RemoteEndPoint{ get{ return remoteEndPoint; } set{ remoteEndPoint = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System.Runtime.Serialization; namespace System.Net.Sockets { [Serializable] public struct SocketInformation{ byte[] protocolInformation; SocketInformationOptions options; [OptionalField] EndPoint remoteEndPoint; public byte[] ProtocolInformation{ get{ return protocolInformation; } set{ protocolInformation = value; } } public SocketInformationOptions Options{ get{ return options; } set{ options = value; } } internal bool IsNonBlocking{ get{ return ((options&SocketInformationOptions.NonBlocking)!=0); } set{ if(value){ options |= SocketInformationOptions.NonBlocking; } else{ options &= ~SocketInformationOptions.NonBlocking; } } } internal bool IsConnected{ get{ return ((options&SocketInformationOptions.Connected)!=0); } set{ if(value){ options |= SocketInformationOptions.Connected; } else{ options &= ~SocketInformationOptions.Connected; } } } internal bool IsListening{ get{ return ((options&SocketInformationOptions.Listening)!=0); } set{ if(value){ options |= SocketInformationOptions.Listening; } else{ options &= ~SocketInformationOptions.Listening; } } } internal bool UseOnlyOverlappedIO{ get{ return ((options&SocketInformationOptions.UseOnlyOverlappedIO)!=0); } set{ if(value){ options |= SocketInformationOptions.UseOnlyOverlappedIO; } else{ options &= ~SocketInformationOptions.UseOnlyOverlappedIO; } } } internal EndPoint RemoteEndPoint{ get{ return remoteEndPoint; } set{ remoteEndPoint = value; } } } } // 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
- CollectionBase.cs
- SingleTagSectionHandler.cs
- SqlCacheDependencyDatabaseCollection.cs
- GraphicsContainer.cs
- EntryPointNotFoundException.cs
- ProcessProtocolHandler.cs
- ZipArchive.cs
- BinaryParser.cs
- GridViewDeleteEventArgs.cs
- SafeEventLogReadHandle.cs
- TableDetailsRow.cs
- DelegatingStream.cs
- RolePrincipal.cs
- CompareValidator.cs
- DataGridTextBoxColumn.cs
- Zone.cs
- DbProviderConfigurationHandler.cs
- ControlBuilderAttribute.cs
- AccessText.cs
- httpstaticobjectscollection.cs
- DrawListViewColumnHeaderEventArgs.cs
- PathParser.cs
- PipeStream.cs
- NavigateEvent.cs
- PartBasedPackageProperties.cs
- ObjectNavigationPropertyMapping.cs
- SqlXmlStorage.cs
- InvalidComObjectException.cs
- RtfControls.cs
- IndexedString.cs
- RSACryptoServiceProvider.cs
- _AuthenticationState.cs
- SessionEndedEventArgs.cs
- ListViewSortEventArgs.cs
- ObjectDataSourceSelectingEventArgs.cs
- String.cs
- HttpInputStream.cs
- MetadataUtilsSmi.cs
- COM2IProvidePropertyBuilderHandler.cs
- EntitySetBase.cs
- XmlHierarchyData.cs
- DiscoveryClientElement.cs
- XmlSchemaComplexType.cs
- BasicViewGenerator.cs
- AnimationClockResource.cs
- MethodBuilder.cs
- KeyGestureValueSerializer.cs
- RangeBaseAutomationPeer.cs
- WindowsGraphicsCacheManager.cs
- HMACSHA384.cs
- DataViewManagerListItemTypeDescriptor.cs
- HierarchicalDataBoundControl.cs
- ConstructorBuilder.cs
- DrawListViewSubItemEventArgs.cs
- ApplyTemplatesAction.cs
- QueryableFilterUserControl.cs
- TextSerializer.cs
- SR.Designer.cs
- SoapIgnoreAttribute.cs
- AuthenticationModulesSection.cs
- DetailsViewUpdateEventArgs.cs
- DataRelationPropertyDescriptor.cs
- FixedElement.cs
- PngBitmapDecoder.cs
- EmptyEnumerator.cs
- AttachedProperty.cs
- XmlSchemaAnnotation.cs
- PropertiesTab.cs
- RegexGroupCollection.cs
- ImageMetadata.cs
- XhtmlConformanceSection.cs
- TableRowGroupCollection.cs
- SQLDateTimeStorage.cs
- ObjectCache.cs
- CharStorage.cs
- ScriptingScriptResourceHandlerSection.cs
- ToolStripPanelRenderEventArgs.cs
- ChtmlTextWriter.cs
- SynchronizationContext.cs
- SchemaExporter.cs
- ListItemCollection.cs
- WebPartConnectionsConfigureVerb.cs
- WindowsIdentity.cs
- XsdCachingReader.cs
- SignedInfo.cs
- ActivityBindForm.cs
- TaiwanLunisolarCalendar.cs
- OleDbTransaction.cs
- EncryptionUtility.cs
- FixedFindEngine.cs
- FieldAccessException.cs
- Size.cs
- UICuesEvent.cs
- SelfIssuedAuthRSACryptoProvider.cs
- PointAnimation.cs
- XDeferredAxisSource.cs
- CallbackDebugBehavior.cs
- GPRECT.cs
- RegistryDataKey.cs
- ArgIterator.cs