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
- RSAPKCS1SignatureFormatter.cs
- SynchronousReceiveBehavior.cs
- QilExpression.cs
- DetailsViewPagerRow.cs
- Vector3dCollection.cs
- UnaryNode.cs
- RenderDataDrawingContext.cs
- ScrollEvent.cs
- XmlCDATASection.cs
- TextBlockAutomationPeer.cs
- DesignerTextViewAdapter.cs
- RelationshipConverter.cs
- DataListItemEventArgs.cs
- WindowsListViewItemStartMenu.cs
- _DomainName.cs
- CipherData.cs
- TypeAccessException.cs
- WindowsRegion.cs
- ReadOnlyHierarchicalDataSource.cs
- FlowDocumentView.cs
- Block.cs
- SchemaElement.cs
- XamlHostingSection.cs
- EllipseGeometry.cs
- DesignerDeviceConfig.cs
- ProcessInputEventArgs.cs
- DeferredBinaryDeserializerExtension.cs
- XmlHierarchicalEnumerable.cs
- CompilerTypeWithParams.cs
- DesignTimeTemplateParser.cs
- WebPartConnectionsConfigureVerb.cs
- MatrixAnimationUsingKeyFrames.cs
- WorkflowMarkupSerializationManager.cs
- Processor.cs
- Assign.cs
- Calendar.cs
- VirtualizedItemProviderWrapper.cs
- CompiledRegexRunnerFactory.cs
- DataRowChangeEvent.cs
- SerializationInfoEnumerator.cs
- WindowsListViewScroll.cs
- DES.cs
- PerformanceCounterCategory.cs
- DeadCharTextComposition.cs
- SiteMapHierarchicalDataSourceView.cs
- XmlQueryTypeFactory.cs
- XamlPathDataSerializer.cs
- SafeProcessHandle.cs
- WmiInstallComponent.cs
- InertiaRotationBehavior.cs
- SqlClientWrapperSmiStreamChars.cs
- ValidatorUtils.cs
- ProxyAttribute.cs
- PrincipalPermission.cs
- ControlPropertyNameConverter.cs
- SessionIDManager.cs
- XdrBuilder.cs
- BoundConstants.cs
- TypeDependencyAttribute.cs
- ExceptionRoutedEventArgs.cs
- DataSourceControl.cs
- DefaultTextStoreTextComposition.cs
- HtmlTextArea.cs
- UidManager.cs
- Popup.cs
- ServiceDurableInstance.cs
- BitmapCodecInfoInternal.cs
- HttpRequestTraceRecord.cs
- CodeChecksumPragma.cs
- NestedContainer.cs
- RawStylusInputCustomData.cs
- Switch.cs
- CallbackDebugBehavior.cs
- FactoryGenerator.cs
- TemplateField.cs
- ManagementObjectSearcher.cs
- NonVisualControlAttribute.cs
- KeyNotFoundException.cs
- UseManagedPresentationElement.cs
- SpeechEvent.cs
- AlternationConverter.cs
- XmlWriterSettings.cs
- PerformanceCountersElement.cs
- MetadataException.cs
- DbUpdateCommandTree.cs
- SessionPageStateSection.cs
- _ScatterGatherBuffers.cs
- TransformGroup.cs
- CompressStream.cs
- TypeDependencyAttribute.cs
- TypeBrowser.xaml.cs
- BevelBitmapEffect.cs
- ColorConvertedBitmap.cs
- PriorityRange.cs
- Clipboard.cs
- XmlWriterSettings.cs
- ConfigsHelper.cs
- Int64AnimationBase.cs
- XslCompiledTransform.cs
- ToolboxItemCollection.cs