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
- MobileResource.cs
- OleDbPropertySetGuid.cs
- OperatorExpressions.cs
- IRCollection.cs
- StreamGeometryContext.cs
- DbConnectionPoolGroupProviderInfo.cs
- BindableTemplateBuilder.cs
- XDRSchema.cs
- HtmlControlPersistable.cs
- SerializerProvider.cs
- ExpandCollapsePattern.cs
- AccessDataSource.cs
- DependencyProperty.cs
- GridViewHeaderRowPresenter.cs
- SqlXml.cs
- DropDownButton.cs
- ConfigLoader.cs
- SignatureDescription.cs
- SiteMapSection.cs
- MailWriter.cs
- ToolboxItem.cs
- TextTreeNode.cs
- WorkflowItemsPresenter.cs
- indexingfiltermarshaler.cs
- DataRowChangeEvent.cs
- GlobalizationSection.cs
- CustomAttributeBuilder.cs
- UnmanagedMemoryStream.cs
- SigningCredentials.cs
- StatusBar.cs
- PerformanceCountersBase.cs
- CryptoHelper.cs
- LockCookie.cs
- SystemColorTracker.cs
- FrameworkElement.cs
- ChangesetResponse.cs
- RelativeSource.cs
- DesignTimeParseData.cs
- InternalConfigSettingsFactory.cs
- SortKey.cs
- ToolStripRenderEventArgs.cs
- CodeVariableReferenceExpression.cs
- WebDisplayNameAttribute.cs
- BrowserTree.cs
- ProtocolsSection.cs
- DataContractSerializerFaultFormatter.cs
- XamlPointCollectionSerializer.cs
- BuilderPropertyEntry.cs
- IgnoreFlushAndCloseStream.cs
- AnimationLayer.cs
- DLinqTableProvider.cs
- NativeWindow.cs
- ParentControlDesigner.cs
- DropAnimation.xaml.cs
- PathStreamGeometryContext.cs
- SystemDropShadowChrome.cs
- Page.cs
- BeginEvent.cs
- PathStreamGeometryContext.cs
- FindCriteria.cs
- Object.cs
- serverconfig.cs
- DataColumnCollection.cs
- StringStorage.cs
- InputLanguageEventArgs.cs
- ProgressiveCrcCalculatingStream.cs
- ArrayList.cs
- ScriptControl.cs
- DetailsViewRowCollection.cs
- ReflectTypeDescriptionProvider.cs
- ControlEvent.cs
- ServiceSecurityContext.cs
- MembershipValidatePasswordEventArgs.cs
- TextReader.cs
- SqlCacheDependencyDatabase.cs
- TemplateAction.cs
- SendParametersContent.cs
- CallId.cs
- GeometryValueSerializer.cs
- Attribute.cs
- DisplayNameAttribute.cs
- DetailsViewDeleteEventArgs.cs
- ConfigXmlText.cs
- DataBoundLiteralControl.cs
- ProviderCommandInfoUtils.cs
- GlobalProxySelection.cs
- PointConverter.cs
- Vector3dCollection.cs
- FindResponse.cs
- TransactionInterop.cs
- ByteFacetDescriptionElement.cs
- ArithmeticException.cs
- TrustSection.cs
- HttpContext.cs
- LoadWorkflowByKeyAsyncResult.cs
- TagPrefixInfo.cs
- SolidColorBrush.cs
- PropertyDescriptorCollection.cs
- HyperLinkColumn.cs
- DocumentGridContextMenu.cs