Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / Sockets / _DisconnectOverlappedAsyncResult.cs / 1 / _DisconnectOverlappedAsyncResult.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System; using System.Net; using System.Runtime.InteropServices; using System.Threading; using Microsoft.Win32; // // DisconnectOverlappedAsyncResult - used to take care of storage for async Socket BeginAccept call. // internal class DisconnectOverlappedAsyncResult : BaseOverlappedAsyncResult { internal DisconnectOverlappedAsyncResult(Socket socket, Object asyncState, AsyncCallback asyncCallback): base(socket,asyncState,asyncCallback) { } // // This method will be called by us when the IO completes synchronously and // by the ThreadPool when the IO completes asynchronously. (only called on WinNT) // internal override object PostCompletion(int numBytes) { if (ErrorCode == (int)SocketError.Success) { Socket socket = (Socket)AsyncObject; socket.SetToDisconnected(); socket.m_RemoteEndPoint = null; } return base.PostCompletion(numBytes); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System; using System.Net; using System.Runtime.InteropServices; using System.Threading; using Microsoft.Win32; // // DisconnectOverlappedAsyncResult - used to take care of storage for async Socket BeginAccept call. // internal class DisconnectOverlappedAsyncResult : BaseOverlappedAsyncResult { internal DisconnectOverlappedAsyncResult(Socket socket, Object asyncState, AsyncCallback asyncCallback): base(socket,asyncState,asyncCallback) { } // // This method will be called by us when the IO completes synchronously and // by the ThreadPool when the IO completes asynchronously. (only called on WinNT) // internal override object PostCompletion(int numBytes) { if (ErrorCode == (int)SocketError.Success) { Socket socket = (Socket)AsyncObject; socket.SetToDisconnected(); socket.m_RemoteEndPoint = null; } return base.PostCompletion(numBytes); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- mediaeventshelper.cs
- DesignParameter.cs
- Ref.cs
- VirtualPathUtility.cs
- EndOfStreamException.cs
- BamlRecordHelper.cs
- serverconfig.cs
- FontSource.cs
- Events.cs
- SingleAnimationUsingKeyFrames.cs
- Utils.cs
- DbParameterHelper.cs
- SessionParameter.cs
- FormsAuthenticationModule.cs
- InvalidComObjectException.cs
- MasterPageCodeDomTreeGenerator.cs
- ThemeDirectoryCompiler.cs
- ProgressBarRenderer.cs
- AbandonedMutexException.cs
- X509CertificateTrustedIssuerElement.cs
- StateBag.cs
- DrawToolTipEventArgs.cs
- WindowProviderWrapper.cs
- BidOverLoads.cs
- LedgerEntryCollection.cs
- LogWriteRestartAreaState.cs
- ChangeTracker.cs
- AutomationPropertyInfo.cs
- RemoteTokenFactory.cs
- Form.cs
- HttpCookiesSection.cs
- WebPartZoneBase.cs
- DtdParser.cs
- MetadataExchangeClient.cs
- XmlElementCollection.cs
- ObjectDataSourceView.cs
- DbMetaDataCollectionNames.cs
- ComboBoxHelper.cs
- EntitySet.cs
- ColumnReorderedEventArgs.cs
- MLangCodePageEncoding.cs
- Baml2006SchemaContext.cs
- Lease.cs
- MimeMapping.cs
- Mapping.cs
- SubclassTypeValidatorAttribute.cs
- FilterInvalidBodyAccessException.cs
- ToolboxDataAttribute.cs
- MessageSecurityOverTcp.cs
- OutgoingWebRequestContext.cs
- HeaderElement.cs
- DbConnectionFactory.cs
- AppDomainFactory.cs
- TagMapInfo.cs
- WSHttpTransportSecurityElement.cs
- TextServicesProperty.cs
- XmlNullResolver.cs
- JsonObjectDataContract.cs
- ColumnCollection.cs
- DetailsViewRow.cs
- ReturnValue.cs
- XPathSingletonIterator.cs
- WebServiceMethodData.cs
- HtmlElementEventArgs.cs
- AnonymousIdentificationSection.cs
- AggregateNode.cs
- HtmlEncodedRawTextWriter.cs
- ToolstripProfessionalRenderer.cs
- BooleanKeyFrameCollection.cs
- Hex.cs
- PrimarySelectionGlyph.cs
- ContentDisposition.cs
- ScopeCompiler.cs
- ReflectionUtil.cs
- ImportCatalogPart.cs
- ImportCatalogPart.cs
- CanonicalFormWriter.cs
- safelink.cs
- RowToParametersTransformer.cs
- SoapServerMethod.cs
- AuthenticationConfig.cs
- MILUtilities.cs
- PointAnimationUsingPath.cs
- CryptoSession.cs
- MailMessageEventArgs.cs
- ErrorStyle.cs
- ExceptionNotification.cs
- ForeignConstraint.cs
- WebScriptEnablingBehavior.cs
- ConditionalAttribute.cs
- NullableBoolConverter.cs
- XmlILModule.cs
- KerberosTicketHashIdentifierClause.cs
- StringAttributeCollection.cs
- BooleanFacetDescriptionElement.cs
- DBSqlParserTable.cs
- TextTreeTextElementNode.cs
- DependencyPropertyValueSerializer.cs
- InstanceStore.cs
- EventLogger.cs