Begins an asynchronous to a connection to a remote host using await.
Namespace: Couchbase.IO.UtilsAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntaxpublic static SocketAwaitable ConnectAsync(
this Socket socket,
SocketAwaitable awaitable
)
public static SocketAwaitable ConnectAsync(
this Socket socket,
SocketAwaitable awaitable
)
<ExtensionAttribute>
Public Shared Function ConnectAsync (
socket As Socket,
awaitable As SocketAwaitable
) As SocketAwaitable
<ExtensionAttribute>
Public Shared Function ConnectAsync (
socket As Socket,
awaitable As SocketAwaitable
) As SocketAwaitable
public:
[ExtensionAttribute]
static SocketAwaitable^ ConnectAsync(
Socket^ socket,
SocketAwaitable^ awaitable
)
public:
[ExtensionAttribute]
static SocketAwaitable^ ConnectAsync(
Socket^ socket,
SocketAwaitable^ awaitable
)
static member ConnectAsync :
socket : Socket *
awaitable : SocketAwaitable -> SocketAwaitable
static member ConnectAsync :
socket : Socket *
awaitable : SocketAwaitable -> SocketAwaitable
Parameters
- socket
- Type: System.Net.Sockets.Socket
The connected Socket object to use.
- awaitable
- Type: Couchbase.IO.SocketAwaitable
The SocketAwaitable to await on.
Return Value
Type:
SocketAwaitableA
SocketAwaitable object ready to be reused.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Socket. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also