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
- TextRangeEdit.cs
- AbandonedMutexException.cs
- Enum.cs
- DBAsyncResult.cs
- SQLMoneyStorage.cs
- ForwardPositionQuery.cs
- ListView.cs
- ToolStripItemDataObject.cs
- RuntimeEnvironment.cs
- PrintPreviewControl.cs
- ViewStateModeByIdAttribute.cs
- EnvironmentPermission.cs
- Serializer.cs
- GetCertificateRequest.cs
- JpegBitmapDecoder.cs
- StringFunctions.cs
- DragDrop.cs
- TextAnchor.cs
- BoundPropertyEntry.cs
- ParseNumbers.cs
- AutomationProperty.cs
- FormatterServices.cs
- ImageListImageEditor.cs
- DBDataPermissionAttribute.cs
- DataServiceHost.cs
- DataServiceConfiguration.cs
- Number.cs
- MarginsConverter.cs
- InteropExecutor.cs
- ValidatedControlConverter.cs
- ObjRef.cs
- DynamicPhysicalDiscoSearcher.cs
- CompatibleComparer.cs
- WpfWebRequestHelper.cs
- ObjectAssociationEndMapping.cs
- GeneratedView.cs
- ThousandthOfEmRealPoints.cs
- RegistrationServices.cs
- AsymmetricSignatureDeformatter.cs
- XmlNode.cs
- WebColorConverter.cs
- DefaultPrintController.cs
- AuthenticatedStream.cs
- ColorIndependentAnimationStorage.cs
- Script.cs
- RectAnimationUsingKeyFrames.cs
- ClonableStack.cs
- CodeMethodReturnStatement.cs
- HMACRIPEMD160.cs
- EpmContentSerializer.cs
- StaticExtension.cs
- HttpApplication.cs
- ManagedWndProcTracker.cs
- SessionStateUtil.cs
- URLMembershipCondition.cs
- ResourceAssociationSet.cs
- FontUnit.cs
- QilExpression.cs
- Gdiplus.cs
- precedingsibling.cs
- ResourceIDHelper.cs
- ExtractorMetadata.cs
- Border.cs
- DataTemplate.cs
- PasswordTextNavigator.cs
- SemanticResultKey.cs
- BaseUriHelper.cs
- SafeMILHandleMemoryPressure.cs
- MeasureItemEvent.cs
- GridViewColumnHeaderAutomationPeer.cs
- SQLInt64Storage.cs
- OleDbCommand.cs
- TokenBasedSetEnumerator.cs
- TypeLoadException.cs
- AnnotationDocumentPaginator.cs
- ListParaClient.cs
- DataGridBoolColumn.cs
- LazyTextWriterCreator.cs
- XmlMembersMapping.cs
- StyleConverter.cs
- ConfigXmlElement.cs
- httpapplicationstate.cs
- ClientRequest.cs
- SettingsBindableAttribute.cs
- ReflectionHelper.cs
- UInt64Converter.cs
- BuildProviderAppliesToAttribute.cs
- MenuCommand.cs
- HighlightVisual.cs
- DataGridColumn.cs
- StylusDownEventArgs.cs
- MembershipAdapter.cs
- RangeExpression.cs
- SecurityDescriptor.cs
- ComponentEditorForm.cs
- DockAndAnchorLayout.cs
- LongValidatorAttribute.cs
- LogLogRecordEnumerator.cs
- AttributeInfo.cs
- FunctionOverloadResolver.cs