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
- HttpServerUtilityWrapper.cs
- Vector3DCollection.cs
- TreeViewAutomationPeer.cs
- Vector3D.cs
- IncrementalCompileAnalyzer.cs
- DesignerExtenders.cs
- Light.cs
- BrowserCapabilitiesCompiler.cs
- Cursor.cs
- AnnotationResourceChangedEventArgs.cs
- LinkedList.cs
- InstanceHandle.cs
- DataPagerCommandEventArgs.cs
- ErrorTableItemStyle.cs
- LOSFormatter.cs
- WindowsScrollBar.cs
- AddressHeaderCollection.cs
- WCFModelStrings.Designer.cs
- PartialCachingControl.cs
- ApplicationProxyInternal.cs
- SmtpNtlmAuthenticationModule.cs
- XhtmlConformanceSection.cs
- CellPartitioner.cs
- LinqDataSourceValidationException.cs
- PrivateFontCollection.cs
- safex509handles.cs
- SchemaEntity.cs
- TransactionInterop.cs
- IChannel.cs
- GlobalEventManager.cs
- HttpRequestContext.cs
- TreeViewCancelEvent.cs
- DesignerActionListCollection.cs
- AutomationAttributeInfo.cs
- Object.cs
- ApplicationInfo.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SoapElementAttribute.cs
- ExplicitDiscriminatorMap.cs
- StateMachineExecutionState.cs
- CodeAttributeArgumentCollection.cs
- FrameworkElementFactory.cs
- ValidationErrorCollection.cs
- GridViewDeleteEventArgs.cs
- OrderByBuilder.cs
- OperationSelectorBehavior.cs
- SqlUnionizer.cs
- HuffModule.cs
- XmlILCommand.cs
- ReadOnlyMetadataCollection.cs
- MediaEntryAttribute.cs
- IgnoreSectionHandler.cs
- ValidationHelper.cs
- IssuanceTokenProviderState.cs
- FileRecordSequenceCompletedAsyncResult.cs
- InstallerTypeAttribute.cs
- SelectionEditingBehavior.cs
- ReferenceEqualityComparer.cs
- ResourcesBuildProvider.cs
- ConstrainedGroup.cs
- EventToken.cs
- XmlDataFileEditor.cs
- SmtpLoginAuthenticationModule.cs
- ControlCollection.cs
- ResolvedKeyFrameEntry.cs
- Marshal.cs
- CallSiteHelpers.cs
- ClosableStream.cs
- ApplicationCommands.cs
- StringStorage.cs
- ReadOnlyDictionary.cs
- AspNetCacheProfileAttribute.cs
- AlignmentXValidation.cs
- SimpleExpression.cs
- ConfigurationManagerInternalFactory.cs
- Intellisense.cs
- SizeLimitedCache.cs
- _AutoWebProxyScriptHelper.cs
- ButtonFieldBase.cs
- DataSourceCache.cs
- Flowchart.cs
- TaskExtensions.cs
- Processor.cs
- PersonalizationStateQuery.cs
- GridViewCancelEditEventArgs.cs
- DataGridViewDesigner.cs
- DictionaryBase.cs
- RuleRefElement.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DrawingContext.cs
- TemplateContent.cs
- SHA512.cs
- VisualBrush.cs
- XmlWrappingReader.cs
- parserscommon.cs
- MediaEntryAttribute.cs
- PropertyMetadata.cs
- ViewLoader.cs
- Symbol.cs
- ServicePointManager.cs