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
- DebugView.cs
- DefaultValueConverter.cs
- ConnectionPointCookie.cs
- CompositionAdorner.cs
- DataView.cs
- PickBranch.cs
- DataGridHeaderBorder.cs
- CachingHintValidation.cs
- DataSvcMapFile.cs
- ChangePassword.cs
- ReceiveContent.cs
- Point3DAnimationBase.cs
- UIElementHelper.cs
- MatrixAnimationUsingPath.cs
- RequestQueue.cs
- WebServiceFaultDesigner.cs
- HttpValueCollection.cs
- UrlMapping.cs
- GenericsInstances.cs
- MatrixTransform3D.cs
- EditorZone.cs
- AssociationSet.cs
- WebEventTraceProvider.cs
- RelatedView.cs
- SqlCommandSet.cs
- HttpApplicationFactory.cs
- VideoDrawing.cs
- OverflowException.cs
- StopStoryboard.cs
- HtmlInputCheckBox.cs
- MessageFilterException.cs
- DataServiceProcessingPipeline.cs
- ErrorHandler.cs
- OracleDataReader.cs
- RelationshipConverter.cs
- XmlWrappingWriter.cs
- DataGridPreparingCellForEditEventArgs.cs
- ZoneMembershipCondition.cs
- Win32MouseDevice.cs
- MemberAccessException.cs
- InputScopeAttribute.cs
- MemberInfoSerializationHolder.cs
- SemaphoreSecurity.cs
- OracleRowUpdatedEventArgs.cs
- PropertyEmitterBase.cs
- InstanceKeyCollisionException.cs
- Repeater.cs
- DataRelation.cs
- TdsParserStaticMethods.cs
- PopupEventArgs.cs
- OrderedDictionary.cs
- ExcCanonicalXml.cs
- WindowsListViewItemCheckBox.cs
- SafeHGlobalHandleCritical.cs
- HttpContext.cs
- TcpClientSocketManager.cs
- ScriptMethodAttribute.cs
- Utils.cs
- UnknownBitmapEncoder.cs
- AlphabetConverter.cs
- Cloud.cs
- LogicalExpr.cs
- Peer.cs
- Domain.cs
- XmlBinaryReader.cs
- _SingleItemRequestCache.cs
- CodeArrayIndexerExpression.cs
- base64Transforms.cs
- ReadOnlyDictionary.cs
- SettingsAttributes.cs
- XPathAxisIterator.cs
- TextTreeTextBlock.cs
- OutArgumentConverter.cs
- ServiceDescriptionContext.cs
- BuildDependencySet.cs
- MethodSignatureGenerator.cs
- BinaryExpressionHelper.cs
- GroupBox.cs
- HWStack.cs
- MenuBase.cs
- EventTrigger.cs
- XmlSchemaAnnotated.cs
- ValidateNames.cs
- SignatureDescription.cs
- Matrix.cs
- TrueReadOnlyCollection.cs
- SqlDataSourceQuery.cs
- NonSerializedAttribute.cs
- HtmlElement.cs
- UnsignedPublishLicense.cs
- ErrorTableItemStyle.cs
- ToolStripItemEventArgs.cs
- CollectionsUtil.cs
- SqlBulkCopy.cs
- CompatibleComparer.cs
- MSHTMLHost.cs
- FormatException.cs
- MessagePartProtectionMode.cs
- DependsOnAttribute.cs
- TouchesOverProperty.cs