Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- HttpPostedFileWrapper.cs
- PropertyConverter.cs
- GridViewHeaderRowPresenter.cs
- SoapProcessingBehavior.cs
- UntypedNullExpression.cs
- DependencyObjectType.cs
- DataTableReaderListener.cs
- CanonicalFontFamilyReference.cs
- StorageRoot.cs
- LingerOption.cs
- StreamInfo.cs
- SQLBytesStorage.cs
- UnmanagedMemoryStreamWrapper.cs
- DependencySource.cs
- ExpressionPrinter.cs
- Selector.cs
- DescendantBaseQuery.cs
- TimeoutException.cs
- Delay.cs
- CompositeDuplexElement.cs
- ReadOnlyDataSource.cs
- XmlTextReaderImplHelpers.cs
- SplitterCancelEvent.cs
- SafeViewOfFileHandle.cs
- EventLogPermissionEntryCollection.cs
- OleDbMetaDataFactory.cs
- SqlXml.cs
- TextInfo.cs
- XmlQualifiedName.cs
- CategoryGridEntry.cs
- SqlTransaction.cs
- HotSpotCollectionEditor.cs
- DataGridViewCellParsingEventArgs.cs
- VersionPair.cs
- DesignerTextWriter.cs
- GlobalizationSection.cs
- XmlSchemaImporter.cs
- CodeExporter.cs
- Viewport3DVisual.cs
- BitmapCacheBrush.cs
- GlyphTypeface.cs
- ElementNotAvailableException.cs
- Helpers.cs
- WebPartConnectionsEventArgs.cs
- DBDataPermission.cs
- LoadedOrUnloadedOperation.cs
- KnownColorTable.cs
- COM2PropertyPageUITypeConverter.cs
- FilteredXmlReader.cs
- HandleScope.cs
- HttpValueCollection.cs
- SetterBaseCollection.cs
- HttpCacheVaryByContentEncodings.cs
- SubclassTypeValidator.cs
- Semaphore.cs
- FramingDecoders.cs
- SiteMapNode.cs
- ContextMenuAutomationPeer.cs
- LocatorPart.cs
- ToolStripAdornerWindowService.cs
- TextContainer.cs
- WSSecureConversation.cs
- BaseWebProxyFinder.cs
- SecurityTokenContainer.cs
- ReliableOutputSessionChannel.cs
- ParallelActivityDesigner.cs
- EpmContentDeSerializer.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- UmAlQuraCalendar.cs
- Serializer.cs
- VectorAnimationUsingKeyFrames.cs
- ListViewItem.cs
- InlineUIContainer.cs
- WebPartDeleteVerb.cs
- DocumentViewerConstants.cs
- DataTableNewRowEvent.cs
- xsdvalidator.cs
- CaseExpr.cs
- DocumentSequence.cs
- EditorAttribute.cs
- Exception.cs
- SessionStateSection.cs
- XPathNode.cs
- ThreadStateException.cs
- UserControlParser.cs
- AnnouncementService.cs
- documentsequencetextview.cs
- Label.cs
- XamlFxTrace.cs
- LightweightCodeGenerator.cs
- CheckableControlBaseAdapter.cs
- EncoderParameters.cs
- FunctionImportElement.cs
- Pens.cs
- DeflateEmulationStream.cs
- CellCreator.cs
- DictionaryContent.cs
- GlyphTypeface.cs
- NamespaceDecl.cs
- ReferenceCountedObject.cs