HybridConnectionStream.CloseAsync Method (CancellationToken)
Initiates a graceful close process by shutting down sending through this HybridConnectionStream. To disconnect cleanly and asynchronously, call ShutdownAsync, wait for Read/ReadAsync to complete with a 0 byte read, then finally call Stream.CloseAsync();
Namespace: Microsoft.ServiceBus.Relay
Assembly: Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
Syntax
public abstract Task CloseAsync(
CancellationToken cancellationToken
)
public:
virtual Task^ CloseAsync(
CancellationToken cancellationToken
) abstract
abstract CloseAsync :
cancellationToken:CancellationToken -> Task
Public MustOverride Function CloseAsync (
cancellationToken As CancellationToken
) As Task
Parameters
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task
See Also
HybridConnectionStream Class
Microsoft.ServiceBus.Relay Namespace
Return to top