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
- ToolStripControlHost.cs
- EntityDataReader.cs
- XmlSchemaIdentityConstraint.cs
- BitmapSizeOptions.cs
- SqlDataSourceSelectingEventArgs.cs
- MessageSmuggler.cs
- XmlSchemaInfo.cs
- PrivilegeNotHeldException.cs
- SplitterEvent.cs
- LocationEnvironment.cs
- CompilerScope.cs
- SafeRegistryKey.cs
- XmlFormatExtensionPointAttribute.cs
- SafeTokenHandle.cs
- XmlDataSourceView.cs
- SqlUtils.cs
- TypeDependencyAttribute.cs
- ObjectItemCollection.cs
- XsltArgumentList.cs
- SqlInfoMessageEvent.cs
- BitArray.cs
- ContentIterators.cs
- InkCanvasSelectionAdorner.cs
- CodeArrayCreateExpression.cs
- SqlClientMetaDataCollectionNames.cs
- ListMarkerSourceInfo.cs
- Bold.cs
- ExpressionNode.cs
- SystemColors.cs
- ValidationSettings.cs
- MaterialCollection.cs
- DeferredTextReference.cs
- Matrix3DConverter.cs
- SqlBooleanMismatchVisitor.cs
- ParserExtension.cs
- WindowShowOrOpenTracker.cs
- BinaryObjectWriter.cs
- SessionEndingEventArgs.cs
- MasterPageBuildProvider.cs
- smtpconnection.cs
- RectangleGeometry.cs
- InputMethod.cs
- SqlBulkCopy.cs
- HMACRIPEMD160.cs
- compensatingcollection.cs
- DBSchemaRow.cs
- ColumnCollection.cs
- ActivityMarkupSerializer.cs
- IncrementalHitTester.cs
- DiagnosticStrings.cs
- StreamInfo.cs
- Size.cs
- CngKeyBlobFormat.cs
- ToolStripGrip.cs
- RuntimeHandles.cs
- LinkButton.cs
- SystemIPv4InterfaceProperties.cs
- DataListItem.cs
- MergablePropertyAttribute.cs
- XpsFilter.cs
- MonikerProxyAttribute.cs
- LinqDataSourceInsertEventArgs.cs
- FigureParaClient.cs
- UnsafePeerToPeerMethods.cs
- XmlValidatingReaderImpl.cs
- WebServiceErrorEvent.cs
- MissingMemberException.cs
- SQLInt64.cs
- CompositeControl.cs
- ClientApiGenerator.cs
- SqlInternalConnection.cs
- MissingMemberException.cs
- DocumentsTrace.cs
- FilteredDataSetHelper.cs
- ContractsBCL.cs
- ProvidePropertyAttribute.cs
- CqlLexer.cs
- DesignTimeTemplateParser.cs
- BamlRecords.cs
- SrgsText.cs
- MD5.cs
- FreezableOperations.cs
- BasePattern.cs
- InternalDispatchObject.cs
- InsufficientMemoryException.cs
- BlurBitmapEffect.cs
- HtmlTextViewAdapter.cs
- DocumentOrderComparer.cs
- AttachedPropertyMethodSelector.cs
- SqlDependency.cs
- OleDbConnectionFactory.cs
- SchemaNamespaceManager.cs
- TemplatedWizardStep.cs
- Rotation3DKeyFrameCollection.cs
- EdmProviderManifest.cs
- ExpressionParser.cs
- XdrBuilder.cs
- WpfPayload.cs
- CommittableTransaction.cs
- CalloutQueueItem.cs