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
- InternalSafeNativeMethods.cs
- Size.cs
- TextContainerChangeEventArgs.cs
- QilLiteral.cs
- DbParameterHelper.cs
- RoleManagerEventArgs.cs
- GlobalDataBindingHandler.cs
- CubicEase.cs
- VersionedStreamOwner.cs
- Int32AnimationUsingKeyFrames.cs
- GenericEnumConverter.cs
- AnnotationObservableCollection.cs
- TrackingParameters.cs
- OledbConnectionStringbuilder.cs
- ListItemConverter.cs
- ZipIOCentralDirectoryBlock.cs
- SafeNativeMemoryHandle.cs
- StrongNameKeyPair.cs
- Error.cs
- Nullable.cs
- MediaContextNotificationWindow.cs
- EntityDataSourceConfigureObjectContext.cs
- ControlPaint.cs
- RtfFormatStack.cs
- BezierSegment.cs
- MenuRendererStandards.cs
- ApplicationSecurityManager.cs
- ConfigurationSectionGroup.cs
- XPathMessageContext.cs
- LocalizationCodeDomSerializer.cs
- XmlSchemaSimpleTypeList.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ApplicationServiceManager.cs
- SQLSingleStorage.cs
- Types.cs
- IQueryable.cs
- PrintControllerWithStatusDialog.cs
- WebBrowser.cs
- ToolStripItemTextRenderEventArgs.cs
- LogAppendAsyncResult.cs
- CollectionViewGroupRoot.cs
- HtmlCalendarAdapter.cs
- VisualBrush.cs
- RotateTransform3D.cs
- storepermission.cs
- MenuDesigner.cs
- BuildResultCache.cs
- Rfc2898DeriveBytes.cs
- UdpDiscoveryEndpointProvider.cs
- FactoryId.cs
- ServiceObjectContainer.cs
- RegexCompilationInfo.cs
- AbstractDataSvcMapFileLoader.cs
- TimelineGroup.cs
- listitem.cs
- ExternalException.cs
- StringUtil.cs
- MDIClient.cs
- AbsoluteQuery.cs
- TextCharacters.cs
- WindowsGraphicsCacheManager.cs
- CompareValidator.cs
- ProcessModelSection.cs
- ItemMap.cs
- XmlDataCollection.cs
- AttributeQuery.cs
- AtomMaterializerLog.cs
- KnownBoxes.cs
- ToolStripItemTextRenderEventArgs.cs
- DoubleAnimationUsingKeyFrames.cs
- StatusBar.cs
- InvalidAsynchronousStateException.cs
- DesignerVerb.cs
- Hashtable.cs
- ListViewPagedDataSource.cs
- SendKeys.cs
- DesignerActionHeaderItem.cs
- CollectionViewSource.cs
- CompatibleComparer.cs
- StreamReader.cs
- BufferedOutputAsyncStream.cs
- WebBrowserEvent.cs
- InternalDispatchObject.cs
- SortedSet.cs
- NetDataContractSerializer.cs
- CharEnumerator.cs
- ReceiveContextCollection.cs
- RoutedEvent.cs
- StyleCollection.cs
- ObjectQueryProvider.cs
- AvTrace.cs
- RtType.cs
- UnsafeNativeMethods.cs
- SourceSwitch.cs
- ServerValidateEventArgs.cs
- KeyedQueue.cs
- SqlDataReaderSmi.cs
- ReadOnlyMetadataCollection.cs
- SizeConverter.cs
- SatelliteContractVersionAttribute.cs