Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NonDualMessageSecurityOverHttpElement.cs
- ComponentResourceManager.cs
- CompositeKey.cs
- AssociationSet.cs
- TimelineClockCollection.cs
- DelegateSerializationHolder.cs
- EpmCustomContentSerializer.cs
- Rotation3DAnimationUsingKeyFrames.cs
- StateMachineDesignerPaint.cs
- DockPanel.cs
- NegatedCellConstant.cs
- DateTimeParse.cs
- MdiWindowListItemConverter.cs
- TypeKeyValue.cs
- XmlComplianceUtil.cs
- VisualBrush.cs
- DivideByZeroException.cs
- MessageLoggingElement.cs
- ViewLoader.cs
- XmlConvert.cs
- DataGridViewAccessibleObject.cs
- followingquery.cs
- LayoutEvent.cs
- SafeNativeMethods.cs
- ToolboxItem.cs
- FreezableCollection.cs
- FacetDescriptionElement.cs
- XmlBoundElement.cs
- BookmarkManager.cs
- SerializationInfo.cs
- HandledMouseEvent.cs
- CommandDevice.cs
- BridgeDataRecord.cs
- SecureStringHasher.cs
- Visual3D.cs
- ApplicationId.cs
- TargetControlTypeCache.cs
- HashHelper.cs
- GridViewCancelEditEventArgs.cs
- SmiSettersStream.cs
- ConstraintStruct.cs
- Int32CollectionValueSerializer.cs
- PanelStyle.cs
- ListSourceHelper.cs
- EntityDataSourceDesignerHelper.cs
- HttpWebRequest.cs
- SqlDataSourceAdvancedOptionsForm.cs
- HwndTarget.cs
- PropertyEmitter.cs
- Transaction.cs
- SmiMetaData.cs
- EasingKeyFrames.cs
- EventSourceCreationData.cs
- MessageDispatch.cs
- RootBrowserWindow.cs
- SqlNamer.cs
- RadioButtonList.cs
- CodeSnippetTypeMember.cs
- FileDialog.cs
- PreviewPrintController.cs
- RenamedEventArgs.cs
- SortableBindingList.cs
- SqlRecordBuffer.cs
- RayMeshGeometry3DHitTestResult.cs
- SecurityPermission.cs
- DataServiceBehavior.cs
- HtmlHead.cs
- XPathBinder.cs
- MarkupWriter.cs
- DispatcherSynchronizationContext.cs
- HelloMessageCD1.cs
- AuthenticationSection.cs
- CqlErrorHelper.cs
- X509Certificate2Collection.cs
- ExtendedTransformFactory.cs
- ResourcePermissionBaseEntry.cs
- BuildManagerHost.cs
- __Error.cs
- SelectionChangedEventArgs.cs
- TogglePatternIdentifiers.cs
- ClipboardData.cs
- ExpandSegment.cs
- CodeTypeDeclarationCollection.cs
- SchemaMapping.cs
- BufferModeSettings.cs
- CompilerWrapper.cs
- FlowNode.cs
- RenderingEventArgs.cs
- SetStoryboardSpeedRatio.cs
- ThicknessConverter.cs
- ValidationErrorCollection.cs
- CodePrimitiveExpression.cs
- CommonBehaviorsSection.cs
- BitmapEffect.cs
- ButtonBase.cs
- CurrentChangingEventArgs.cs
- Simplifier.cs
- SqlExpander.cs
- precedingquery.cs
- XmlSchemaChoice.cs