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
- EntityCollection.cs
- CommandField.cs
- Ref.cs
- DataColumnCollection.cs
- DataSourceDesigner.cs
- CommandManager.cs
- FullTrustAssembly.cs
- IInstanceContextProvider.cs
- DomNameTable.cs
- ReflectPropertyDescriptor.cs
- FontInfo.cs
- ConfigurationCollectionAttribute.cs
- Permission.cs
- IODescriptionAttribute.cs
- TextElement.cs
- EditCommandColumn.cs
- PieceNameHelper.cs
- ObjectDataSourceDisposingEventArgs.cs
- HttpCookiesSection.cs
- TreeNodeBindingCollection.cs
- SafeThreadHandle.cs
- UnsafePeerToPeerMethods.cs
- SqlUserDefinedTypeAttribute.cs
- PersonalizationAdministration.cs
- GridViewDeletedEventArgs.cs
- SQLResource.cs
- WebPartAuthorizationEventArgs.cs
- HttpWriter.cs
- HierarchicalDataBoundControlAdapter.cs
- FileBasedResourceGroveler.cs
- XmlAutoDetectWriter.cs
- PrintPreviewControl.cs
- RoleService.cs
- HashRepartitionEnumerator.cs
- Array.cs
- TableProviderWrapper.cs
- QuadraticBezierSegment.cs
- EventLogTraceListener.cs
- PieceNameHelper.cs
- RepeatButtonAutomationPeer.cs
- CodeAttributeArgumentCollection.cs
- WebPartDisplayMode.cs
- TcpTransportElement.cs
- TransformerTypeCollection.cs
- WebPart.cs
- EncryptedData.cs
- LocatorBase.cs
- errorpatternmatcher.cs
- QueryContinueDragEventArgs.cs
- OutOfProcStateClientManager.cs
- WebPartTransformerCollection.cs
- SqlError.cs
- DataGridrowEditEndingEventArgs.cs
- ThemeDictionaryExtension.cs
- XamlStyleSerializer.cs
- StringPropertyBuilder.cs
- XDRSchema.cs
- LightweightCodeGenerator.cs
- SmiEventSink_DeferedProcessing.cs
- ObjectParameter.cs
- TargetControlTypeCache.cs
- TableCellCollection.cs
- LinkButton.cs
- PresentationAppDomainManager.cs
- ErrorHandler.cs
- NamedPermissionSet.cs
- ParameterToken.cs
- Missing.cs
- TextElementAutomationPeer.cs
- ExpiredSecurityTokenException.cs
- WorkItem.cs
- NumericUpDown.cs
- FormViewInsertEventArgs.cs
- PathFigure.cs
- SafeBitVector32.cs
- Util.cs
- SqlDataSourceView.cs
- PrinterSettings.cs
- WebPartExportVerb.cs
- Point.cs
- SelectionListDesigner.cs
- XmlSchemaSequence.cs
- Tag.cs
- AuthenticatingEventArgs.cs
- RowVisual.cs
- SecurityCredentialsManager.cs
- ChannelSinkStacks.cs
- CompensationToken.cs
- TimeSpanStorage.cs
- SqlResolver.cs
- MissingManifestResourceException.cs
- HtmlForm.cs
- SafeBitVector32.cs
- DataTableMapping.cs
- InfoCardHelper.cs
- MatrixTransform3D.cs
- NameValuePair.cs
- MatrixAnimationUsingKeyFrames.cs
- CacheEntry.cs
- Typeface.cs