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
- CalendarDataBindingHandler.cs
- XmlDocumentFragment.cs
- DrawListViewColumnHeaderEventArgs.cs
- ZoomPercentageConverter.cs
- VirtualPath.cs
- GlyphInfoList.cs
- PenThreadWorker.cs
- Ref.cs
- FormViewUpdateEventArgs.cs
- SourceItem.cs
- Column.cs
- OleServicesContext.cs
- DataReceivedEventArgs.cs
- WindowPattern.cs
- FunctionParameter.cs
- QueryExpression.cs
- SqlRemoveConstantOrderBy.cs
- InputProcessorProfilesLoader.cs
- BypassElement.cs
- TypeListConverter.cs
- DependencyPropertyValueSerializer.cs
- ScalarConstant.cs
- ComMethodElementCollection.cs
- DeadCharTextComposition.cs
- ServiceInstanceProvider.cs
- ElementUtil.cs
- Pen.cs
- SimpleType.cs
- XmlAggregates.cs
- WebScriptServiceHostFactory.cs
- RNGCryptoServiceProvider.cs
- _Connection.cs
- StyleXamlTreeBuilder.cs
- AssertFilter.cs
- EdmProperty.cs
- WasEndpointConfigContainer.cs
- Int16Animation.cs
- SimpleMailWebEventProvider.cs
- COM2IDispatchConverter.cs
- MouseWheelEventArgs.cs
- DropTarget.cs
- PartialList.cs
- Int32CollectionConverter.cs
- HttpDebugHandler.cs
- MetaDataInfo.cs
- LinkLabel.cs
- ChildrenQuery.cs
- StructuralComparisons.cs
- ContentControl.cs
- BaseDataList.cs
- DrawingGroupDrawingContext.cs
- _FtpControlStream.cs
- ProcessHostServerConfig.cs
- BitmapEffectDrawingContent.cs
- ValidationPropertyAttribute.cs
- ScriptingScriptResourceHandlerSection.cs
- SqlRowUpdatingEvent.cs
- SendKeys.cs
- TableColumnCollectionInternal.cs
- EntityDataSourceValidationException.cs
- updateconfighost.cs
- DataGridItemEventArgs.cs
- WebPartHelpVerb.cs
- DetailsViewUpdateEventArgs.cs
- ByteAnimationUsingKeyFrames.cs
- HtmlTableRowCollection.cs
- NativeMethods.cs
- ValidationHelper.cs
- RightsManagementProvider.cs
- DependencyProperty.cs
- MethodBody.cs
- MessageQueuePermissionAttribute.cs
- ValidationResult.cs
- HtmlElementCollection.cs
- BitmapEffectInputData.cs
- EntityDataSourceViewSchema.cs
- CacheDependency.cs
- EdmSchemaError.cs
- PersonalizationProvider.cs
- ExtendedPropertiesHandler.cs
- PageCatalogPart.cs
- StringAnimationUsingKeyFrames.cs
- RuleInfoComparer.cs
- PrintControllerWithStatusDialog.cs
- PackageStore.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- XmlSchemaAny.cs
- WS2007HttpBindingElement.cs
- FileIOPermission.cs
- ElementNotAvailableException.cs
- PageAsyncTaskManager.cs
- ExpressionParser.cs
- WebPartExportVerb.cs
- WsdlBuildProvider.cs
- ReflectEventDescriptor.cs
- Soap.cs
- PresentationSource.cs
- RecordBuilder.cs
- SiteMapHierarchicalDataSourceView.cs
- CryptoConfig.cs