Code:
/ FX-1434 / FX-1434 / 1.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
- DbConnectionClosed.cs
- CollectionBase.cs
- DllNotFoundException.cs
- DrawingAttributesDefaultValueFactory.cs
- SqlUtils.cs
- SoapExtensionImporter.cs
- DBParameter.cs
- VisualStateChangedEventArgs.cs
- SamlAuthenticationClaimResource.cs
- FixedSOMTableCell.cs
- DependencyObjectProvider.cs
- _BasicClient.cs
- BindingGroup.cs
- ResourceDictionary.cs
- TabControlToolboxItem.cs
- SqlConnectionManager.cs
- ReferencedCollectionType.cs
- EventSourceCreationData.cs
- GridView.cs
- CombinedGeometry.cs
- AppSettingsSection.cs
- InheritedPropertyChangedEventArgs.cs
- DocumentXmlWriter.cs
- RightsManagementInformation.cs
- CodePageUtils.cs
- CfgSemanticTag.cs
- DrawTreeNodeEventArgs.cs
- XPathEmptyIterator.cs
- MemberMemberBinding.cs
- ResourceLoader.cs
- RpcAsyncResult.cs
- EventArgs.cs
- SafeArrayRankMismatchException.cs
- DesignerValidatorAdapter.cs
- BinaryObjectWriter.cs
- HTMLTagNameToTypeMapper.cs
- BStrWrapper.cs
- HyperLinkStyle.cs
- PropertyIDSet.cs
- LogFlushAsyncResult.cs
- ServiceDurableInstance.cs
- RequestTimeoutManager.cs
- Condition.cs
- Condition.cs
- PreloadedPackages.cs
- FrameworkTextComposition.cs
- ToolStripScrollButton.cs
- WebProxyScriptElement.cs
- util.cs
- UIElement3DAutomationPeer.cs
- TextBoxBase.cs
- FontDifferentiator.cs
- ListenerChannelContext.cs
- ToolStripItemCollection.cs
- UnsafeNativeMethods.cs
- ColorAnimationBase.cs
- FixedSOMSemanticBox.cs
- UserValidatedEventArgs.cs
- KeyedCollection.cs
- ChangesetResponse.cs
- ImpersonateTokenRef.cs
- LinkedList.cs
- SerialPinChanges.cs
- CurrencyManager.cs
- SelectionEditor.cs
- XmlNodeReader.cs
- IndependentAnimationStorage.cs
- AttributeQuery.cs
- securitycriticaldata.cs
- SqlConnection.cs
- ContextDataSource.cs
- FontDialog.cs
- ZipFileInfo.cs
- RotateTransform3D.cs
- Control.cs
- WebPartDisplayModeCollection.cs
- OutputWindow.cs
- SmtpFailedRecipientsException.cs
- RequiredFieldValidator.cs
- CreateUserWizard.cs
- XmlILAnnotation.cs
- WindowPattern.cs
- SoapAttributeOverrides.cs
- GeneralTransform3DGroup.cs
- UpDownEvent.cs
- AuthenticationManager.cs
- XamlReaderConstants.cs
- DataKey.cs
- DashStyle.cs
- RectangleConverter.cs
- bidPrivateBase.cs
- RSACryptoServiceProvider.cs
- TemplateBamlTreeBuilder.cs
- TextContainerChangedEventArgs.cs
- RuntimeConfig.cs
- TypeDescriptor.cs
- AnimationStorage.cs
- LinqDataSourceSelectEventArgs.cs
- _HeaderInfo.cs
- HeaderUtility.cs