Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- keycontainerpermission.cs
- XslAstAnalyzer.cs
- WebPartMovingEventArgs.cs
- Rules.cs
- FrameworkTemplate.cs
- SQLDecimalStorage.cs
- ProfileBuildProvider.cs
- SharedDp.cs
- HierarchicalDataSourceControl.cs
- ResourceDescriptionAttribute.cs
- SmtpMail.cs
- SignatureDescription.cs
- MetafileHeaderWmf.cs
- DataGridViewCellStyleEditor.cs
- Documentation.cs
- ExeConfigurationFileMap.cs
- AdapterUtil.cs
- ObjectDataSourceView.cs
- StorageEntitySetMapping.cs
- WorkflowWebService.cs
- WebPartVerbCollection.cs
- DebugView.cs
- StylusDownEventArgs.cs
- XmlWellformedWriterHelpers.cs
- MetadataArtifactLoaderFile.cs
- DetailsViewCommandEventArgs.cs
- StyleModeStack.cs
- BindUriHelper.cs
- FactoryRecord.cs
- FlowPosition.cs
- DateTimeParse.cs
- XmlImplementation.cs
- UserNamePasswordClientCredential.cs
- DBConnectionString.cs
- ValidationHelper.cs
- ListManagerBindingsCollection.cs
- XmlWriterSettings.cs
- FigureParagraph.cs
- DataChangedEventManager.cs
- MenuBase.cs
- DictionaryTraceRecord.cs
- XPathScanner.cs
- PrimitiveRenderer.cs
- NamespaceImport.cs
- IIS7UserPrincipal.cs
- XmlFileEditor.cs
- Exception.cs
- DbConnectionOptions.cs
- Stream.cs
- EncryptedPackage.cs
- Double.cs
- StringUtil.cs
- ConnectionManagementSection.cs
- MobileControlPersister.cs
- WebPartDescription.cs
- JsonDeserializer.cs
- ObjectCloneHelper.cs
- HostProtectionException.cs
- DataGridViewRowEventArgs.cs
- ObjectKeyFrameCollection.cs
- SourceChangedEventArgs.cs
- keycontainerpermission.cs
- XmlSchemaComplexType.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SatelliteContractVersionAttribute.cs
- IdleTimeoutMonitor.cs
- TranslateTransform3D.cs
- Condition.cs
- HttpApplicationFactory.cs
- UIElementParagraph.cs
- ImageMap.cs
- EventBindingService.cs
- TextRangeProviderWrapper.cs
- XmlConvert.cs
- BufferModesCollection.cs
- ChannelTraceRecord.cs
- AutomationIdentifier.cs
- XamlContextStack.cs
- MenuItem.cs
- remotingproxy.cs
- DataSourceGeneratorException.cs
- BehaviorDragDropEventArgs.cs
- BaseComponentEditor.cs
- RootBrowserWindowProxy.cs
- Focus.cs
- WindowsContainer.cs
- EditingMode.cs
- ViewPort3D.cs
- SqlWorkflowInstanceStoreLock.cs
- SQLInt32.cs
- Simplifier.cs
- XmlTextReader.cs
- AxisAngleRotation3D.cs
- SmtpNtlmAuthenticationModule.cs
- basenumberconverter.cs
- HuffModule.cs
- BitmapEffectDrawing.cs
- ColorPalette.cs
- HttpPostedFile.cs
- RayMeshGeometry3DHitTestResult.cs