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
- BlurBitmapEffect.cs
- IWorkflowDebuggerService.cs
- Comparer.cs
- ManipulationDevice.cs
- GroupBoxAutomationPeer.cs
- DocumentPageHost.cs
- AttributeEmitter.cs
- QueryContinueDragEvent.cs
- RequestContextBase.cs
- Table.cs
- TracedNativeMethods.cs
- BinaryParser.cs
- DataGridViewDataConnection.cs
- ToolboxItemAttribute.cs
- RelatedImageListAttribute.cs
- ReaderWriterLockSlim.cs
- BasicBrowserDialog.cs
- SiteMapPath.cs
- ColorDialog.cs
- ConnectionConsumerAttribute.cs
- DesignerUtils.cs
- CacheManager.cs
- Stylus.cs
- ContractHandle.cs
- SqlExpander.cs
- Exceptions.cs
- DesignerSerializationManager.cs
- IisTraceListener.cs
- WebContext.cs
- WebRequest.cs
- SiteMapSection.cs
- ToolStripManager.cs
- SessionEndingCancelEventArgs.cs
- SafeNativeMemoryHandle.cs
- XslTransform.cs
- DefaultConfirmation.cs
- ReceiveSecurityHeader.cs
- ReferenceEqualityComparer.cs
- HiddenField.cs
- InterleavedZipPartStream.cs
- Property.cs
- SizeChangedInfo.cs
- SynchronizationLockException.cs
- ManagedFilter.cs
- PeerCollaborationPermission.cs
- WinFormsComponentEditor.cs
- Converter.cs
- LockedBorderGlyph.cs
- ObjectToIdCache.cs
- ToolStripItemCollection.cs
- StateDesignerConnector.cs
- PropertyIdentifier.cs
- TextEditorSpelling.cs
- XmlSchemaDatatype.cs
- SQLByteStorage.cs
- ProfileBuildProvider.cs
- SHA256.cs
- PersistChildrenAttribute.cs
- ApplicationCommands.cs
- ImmutableDispatchRuntime.cs
- oledbconnectionstring.cs
- ObjectDataSourceView.cs
- BaseProcessor.cs
- DynamicRendererThreadManager.cs
- MaskInputRejectedEventArgs.cs
- HttpCookiesSection.cs
- ContextMarshalException.cs
- PointAnimationBase.cs
- Line.cs
- ScriptingProfileServiceSection.cs
- IdnMapping.cs
- EntityDataSourceContainerNameConverter.cs
- MetafileHeaderWmf.cs
- Rotation3DKeyFrameCollection.cs
- nulltextcontainer.cs
- DataProtection.cs
- assertwrapper.cs
- SqlMethodCallConverter.cs
- GPPOINT.cs
- VariableModifiersHelper.cs
- SelectingProviderEventArgs.cs
- OleServicesContext.cs
- DomNameTable.cs
- SimpleType.cs
- DataProtection.cs
- ConfigDefinitionUpdates.cs
- SynchronizationHandlesCodeDomSerializer.cs
- ACE.cs
- RadioButtonAutomationPeer.cs
- OdbcFactory.cs
- TagPrefixCollection.cs
- RecordManager.cs
- UrlMappingCollection.cs
- ItemCheckedEvent.cs
- SHA512Managed.cs
- XmlReflectionImporter.cs
- ToolConsole.cs
- unsafeIndexingFilterStream.cs
- ChangeProcessor.cs
- Assembly.cs