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
- Inflater.cs
- GeometryModel3D.cs
- XmlCountingReader.cs
- RepeaterItem.cs
- VectorValueSerializer.cs
- AssociationTypeEmitter.cs
- MdbDataFileEditor.cs
- KnownTypes.cs
- ProviderUtil.cs
- FormsAuthenticationTicket.cs
- DetailsView.cs
- FontSourceCollection.cs
- BooleanProjectedSlot.cs
- WorkflowRuntimeService.cs
- HttpHandlersSection.cs
- WebSysDescriptionAttribute.cs
- XamlTypeMapper.cs
- DocumentApplicationJournalEntry.cs
- ArraySubsetEnumerator.cs
- MenuItemCollectionEditorDialog.cs
- OutputCacheProfile.cs
- SchemaContext.cs
- ErrorProvider.cs
- ContractCodeDomInfo.cs
- PropertyTabChangedEvent.cs
- ToolStripRendererSwitcher.cs
- PrefixHandle.cs
- SchemaConstraints.cs
- TabRenderer.cs
- ContentPresenter.cs
- SinglePhaseEnlistment.cs
- TextElement.cs
- ErrorsHelper.cs
- Stream.cs
- GregorianCalendar.cs
- RegexCompilationInfo.cs
- XmlSchemaParticle.cs
- Menu.cs
- ArgumentDesigner.xaml.cs
- ConvertersCollection.cs
- CodeTypeReferenceCollection.cs
- CustomValidator.cs
- HtmlShim.cs
- AlphabeticalEnumConverter.cs
- ToolboxBitmapAttribute.cs
- DataExpression.cs
- WhitespaceRuleReader.cs
- FileEnumerator.cs
- PartitionedStream.cs
- DivideByZeroException.cs
- SqlBuilder.cs
- ObjectPropertyMapping.cs
- Activator.cs
- Transform3DCollection.cs
- EditorServiceContext.cs
- GlobalProxySelection.cs
- EventBuilder.cs
- RbTree.cs
- DataRowView.cs
- SwitchDesigner.xaml.cs
- QueryCacheKey.cs
- BitmapSourceSafeMILHandle.cs
- AddInBase.cs
- XmlAttribute.cs
- DataBoundLiteralControl.cs
- SqlCacheDependencyDatabaseCollection.cs
- ButtonColumn.cs
- ShowExpandedMultiValueConverter.cs
- WebReference.cs
- PropertyFilterAttribute.cs
- ContextMarshalException.cs
- CollaborationHelperFunctions.cs
- DbConnectionStringBuilder.cs
- Int16.cs
- ProfilePropertyMetadata.cs
- DBCommand.cs
- GeometryDrawing.cs
- VectorCollectionConverter.cs
- ELinqQueryState.cs
- EventBuilder.cs
- BuildManagerHost.cs
- ReferencedAssembly.cs
- FilteredAttributeCollection.cs
- TextServicesHost.cs
- AlternationConverter.cs
- NegotiationTokenAuthenticatorState.cs
- ILGenerator.cs
- _ScatterGatherBuffers.cs
- EntityDesignerUtils.cs
- PropertyEmitterBase.cs
- CodeTypeMemberCollection.cs
- XmlWhitespace.cs
- DoubleCollectionValueSerializer.cs
- UriTemplateVariableQueryValue.cs
- PrimitiveType.cs
- FileLevelControlBuilderAttribute.cs
- SafeHandles.cs
- DrawingContextWalker.cs
- WorkflowRuntimeSection.cs
- RecognizerBase.cs