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
- FolderBrowserDialog.cs
- Msec.cs
- LineSegment.cs
- EnvelopedSignatureTransform.cs
- XamlRtfConverter.cs
- StackSpiller.Temps.cs
- TextTreeInsertUndoUnit.cs
- MetadataArtifactLoaderCompositeResource.cs
- SchemaElementDecl.cs
- RectIndependentAnimationStorage.cs
- ToolStripOverflow.cs
- ColorContextHelper.cs
- StopStoryboard.cs
- Switch.cs
- StylusSystemGestureEventArgs.cs
- BindingNavigator.cs
- SQlBooleanStorage.cs
- NeutralResourcesLanguageAttribute.cs
- NavigatingCancelEventArgs.cs
- CngProvider.cs
- WindowsListViewGroupHelper.cs
- Label.cs
- ParameterModifier.cs
- PagesSection.cs
- RowCache.cs
- TemplateBamlTreeBuilder.cs
- DecoderBestFitFallback.cs
- OrderPreservingMergeHelper.cs
- counter.cs
- ProviderSettingsCollection.cs
- XmlSchemaValidator.cs
- BehaviorEditorPart.cs
- StreamWriter.cs
- DbQueryCommandTree.cs
- WrappedIUnknown.cs
- SmtpNegotiateAuthenticationModule.cs
- SchemaDeclBase.cs
- LinearGradientBrush.cs
- GeneralTransform3D.cs
- LayoutInformation.cs
- XsltCompileContext.cs
- HttpConfigurationContext.cs
- RegisteredExpandoAttribute.cs
- LocatorPart.cs
- SafeNativeMethods.cs
- SerializationInfoEnumerator.cs
- NavigationWindowAutomationPeer.cs
- Span.cs
- ProfileEventArgs.cs
- CategoryAttribute.cs
- ToolStripOverflow.cs
- SimpleType.cs
- TraceData.cs
- SmtpException.cs
- ListViewInsertionMark.cs
- Thumb.cs
- UInt16Converter.cs
- DocumentPaginator.cs
- XamlTypeWithExplicitNamespace.cs
- SelectedCellsChangedEventArgs.cs
- QilPatternFactory.cs
- _NtlmClient.cs
- ToolStripLabel.cs
- Point4DValueSerializer.cs
- XamlFigureLengthSerializer.cs
- FolderBrowserDialog.cs
- LinqToSqlWrapper.cs
- DeviceSpecificDialogCachedState.cs
- _SecureChannel.cs
- WebControlsSection.cs
- Automation.cs
- EditBehavior.cs
- Matrix.cs
- CodeThrowExceptionStatement.cs
- RectIndependentAnimationStorage.cs
- ValidationEventArgs.cs
- TypeForwardedFromAttribute.cs
- CookieParameter.cs
- HtmlInputText.cs
- PermissionAttributes.cs
- ObjectViewEntityCollectionData.cs
- OdbcDataAdapter.cs
- HostAdapter.cs
- CodeMemberProperty.cs
- XmlSchemaInclude.cs
- DynamicValidatorEventArgs.cs
- HeaderedContentControl.cs
- Translator.cs
- SmtpTransport.cs
- ProfileGroupSettings.cs
- MgmtResManager.cs
- GroupAggregateExpr.cs
- PointLightBase.cs
- httpserverutility.cs
- Task.cs
- XmlAnyElementAttributes.cs
- RbTree.cs
- PersonalizationStateInfo.cs
- RegistryKey.cs
- TabPage.cs