Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ThreadExceptionEvent.cs
- XamlGridLengthSerializer.cs
- StringOutput.cs
- Style.cs
- Message.cs
- nulltextnavigator.cs
- InternalCache.cs
- IconConverter.cs
- TemplateControlCodeDomTreeGenerator.cs
- HtmlTable.cs
- WeakEventManager.cs
- SettingsAttributes.cs
- PathFigureCollection.cs
- SQLMembershipProvider.cs
- ComAdminInterfaces.cs
- TableCellCollection.cs
- DataGridRelationshipRow.cs
- XmlCharCheckingReader.cs
- StrokeCollectionConverter.cs
- CompiledELinqQueryState.cs
- HtmlSelectionListAdapter.cs
- WebWorkflowRole.cs
- EventBindingService.cs
- HtmlObjectListAdapter.cs
- EdmValidator.cs
- remotingproxy.cs
- RtfControls.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- SmtpReplyReader.cs
- LinkedResource.cs
- SiteOfOriginContainer.cs
- HashAlgorithm.cs
- Pointer.cs
- XmlReaderSettings.cs
- TrustManagerPromptUI.cs
- XmlSchemaGroup.cs
- PointF.cs
- ExchangeUtilities.cs
- Compilation.cs
- MetaDataInfo.cs
- ValidationHelpers.cs
- OdbcException.cs
- StatusBarPanelClickEvent.cs
- SubpageParaClient.cs
- GlyphingCache.cs
- IISMapPath.cs
- ThreadStartException.cs
- FilterableAttribute.cs
- BaseDataList.cs
- StreamingContext.cs
- XmlDocumentSchema.cs
- WebControlsSection.cs
- Drawing.cs
- AmbientEnvironment.cs
- TakeQueryOptionExpression.cs
- SecurityVersion.cs
- AsnEncodedData.cs
- WebServiceMethodData.cs
- DESCryptoServiceProvider.cs
- Reference.cs
- WebSysDisplayNameAttribute.cs
- EndPoint.cs
- StylusPointProperties.cs
- ProvidePropertyAttribute.cs
- JoinGraph.cs
- NativeDirectoryServicesQueryAPIs.cs
- DataGridRowEventArgs.cs
- WindowsStartMenu.cs
- WebPartUtil.cs
- XmlSecureResolver.cs
- PointCollection.cs
- DataBinder.cs
- DataGridViewLinkColumn.cs
- AttachedPropertiesService.cs
- ComponentConverter.cs
- EncodingInfo.cs
- ClientRuntimeConfig.cs
- Shape.cs
- DummyDataSource.cs
- DateTimeConverter2.cs
- RichTextBoxAutomationPeer.cs
- BitmapEffectOutputConnector.cs
- SqlFlattener.cs
- DesignerToolStripControlHost.cs
- ClientApiGenerator.cs
- EllipticalNodeOperations.cs
- CallbackException.cs
- PolicyValidationException.cs
- RegexNode.cs
- CodeSnippetStatement.cs
- DrawingDrawingContext.cs
- StyleTypedPropertyAttribute.cs
- WindowsIPAddress.cs
- GlyphTypeface.cs
- ManagementDateTime.cs
- XPathArrayIterator.cs
- List.cs
- DrawingContextDrawingContextWalker.cs
- ActivityWithResultWrapper.cs
- _TimerThread.cs