Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Begins an asynchronous operation to close a communication object.
BeginClose(AsyncCallback, Object) |
Begins an asynchronous operation to close a communication object. |
BeginClose(TimeSpan, AsyncCallback, Object) |
Begins an asynchronous operation to close a communication object with a specified timeout. |
Begins an asynchronous operation to close a communication object.
public:
virtual IAsyncResult ^ BeginClose(AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginClose(AsyncCallback callback, object state);
abstract member BeginClose : AsyncCallback * obj -> IAsyncResult
override this.BeginClose : AsyncCallback * obj -> IAsyncResult
Public Function BeginClose (callback As AsyncCallback, state As Object) As IAsyncResult
The AsyncCallback delegate that receives notification of the completion of the asynchronous close operation.
An object, specified by the application, that contains state information associated with the asynchronous close operation.
The IAsyncResult that references the asynchronous close operation.
The communication object is in a Faulted state and cannot be modified.
The default interval of time that was allotted for the operation was exceeded before the operation was completed.
This method causes the CommunicationObject to gracefully transition from any state, other than the Closed state, into the Closed state within a default interval of time. The BeginClose method allows any unfinished work to be completed before returning. For example, finish sending any buffered messages). This method calls OnBeginOpen(TimeSpan, AsyncCallback, Object) if the communication object was initially in the Opened state.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
Begins an asynchronous operation to close a communication object with a specified timeout.
public:
virtual IAsyncResult ^ BeginClose(TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginClose(TimeSpan timeout, AsyncCallback callback, object state);
abstract member BeginClose : TimeSpan * AsyncCallback * obj -> IAsyncResult
override this.BeginClose : TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Function BeginClose (timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult
The TimeSpan that specifies how long the close operation has to complete before timing out.
The AsyncCallback delegate that receives notification of the completion of the asynchronous close operation.
An object, specified by the application, that contains state information associated with the asynchronous close operation.
The IAsyncResult that references the asynchronous close operation.
The communication object is in a Faulted state and cannot be modified.
The default interval of time that was allotted for the operation was exceeded before the operation was completed.
This method causes the CommunicationObject to gracefully transition from any state, other than the Closed state, into the Closed state with in a specified interval of time. The BeginClose method allows any unfinished work to be completed before returning. For example, finish sending any buffered messages). This method calls OnBeginClose(TimeSpan, AsyncCallback, Object) if the communication object was initially in the Opened state.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Please sign in to use this experience.
Sign in