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
- LinqDataSourceContextData.cs
- PrimitiveType.cs
- SelectionHighlightInfo.cs
- ProfileEventArgs.cs
- InternalBase.cs
- DuplicateContext.cs
- CodeNamespaceImport.cs
- OwnerDrawPropertyBag.cs
- DayRenderEvent.cs
- SqlCommand.cs
- SettingsSavedEventArgs.cs
- Gdiplus.cs
- FormattedTextSymbols.cs
- SqlClientMetaDataCollectionNames.cs
- CheckBoxRenderer.cs
- ListBase.cs
- RegisteredExpandoAttribute.cs
- PartitionedStream.cs
- TimelineGroup.cs
- Ops.cs
- EntryPointNotFoundException.cs
- ObjectStorage.cs
- TimeStampChecker.cs
- FacetValues.cs
- KerberosSecurityTokenAuthenticator.cs
- DesignerLoader.cs
- DeviceContext.cs
- TextProviderWrapper.cs
- SqlConnectionStringBuilder.cs
- SendMailErrorEventArgs.cs
- DelegatedStream.cs
- ActiveXContainer.cs
- AdRotatorDesigner.cs
- EditorReuseAttribute.cs
- PropertyValueUIItem.cs
- OutputChannel.cs
- ArrayTypeMismatchException.cs
- ManipulationDelta.cs
- NavigationProperty.cs
- FormViewCommandEventArgs.cs
- UnsafeNativeMethods.cs
- XmlEntity.cs
- ObjectDataSource.cs
- EnterpriseServicesHelper.cs
- StrokeNodeOperations2.cs
- PeerNearMe.cs
- StringInfo.cs
- SiteIdentityPermission.cs
- XhtmlTextWriter.cs
- ConditionalDesigner.cs
- Privilege.cs
- MimeMapping.cs
- BitmapEffect.cs
- LinqDataSourceStatusEventArgs.cs
- GenericsInstances.cs
- TabRenderer.cs
- DependsOnAttribute.cs
- XamlTreeBuilderBamlRecordWriter.cs
- RequestCacheEntry.cs
- ColorTransform.cs
- MessageQueuePermission.cs
- ImageDrawing.cs
- SizeF.cs
- OracleMonthSpan.cs
- RadioButton.cs
- Tool.cs
- ParameterCollection.cs
- FlowLayout.cs
- ScriptBehaviorDescriptor.cs
- ViewEventArgs.cs
- WebHttpDispatchOperationSelectorData.cs
- EventRouteFactory.cs
- HttpAsyncResult.cs
- BezierSegment.cs
- CachedTypeface.cs
- DataGridViewCellEventArgs.cs
- TaskCanceledException.cs
- UnsafeNetInfoNativeMethods.cs
- ConditionBrowserDialog.cs
- ProjectionPathBuilder.cs
- NativeMsmqMessage.cs
- ProcessHost.cs
- WebPartAuthorizationEventArgs.cs
- Vector3D.cs
- Content.cs
- RemotingSurrogateSelector.cs
- IndentedWriter.cs
- AttributedMetaModel.cs
- EntityDataSourceValidationException.cs
- relpropertyhelper.cs
- initElementDictionary.cs
- SchemaInfo.cs
- SafeHandle.cs
- PropertyChangeTracker.cs
- GetWinFXPath.cs
- ResourceManager.cs
- ExtendedTransformFactory.cs
- Image.cs
- CodePageEncoding.cs
- SocketInformation.cs