DnssdServiceInstance.RegisterStreamSocketListenerAsync 方法

定义

重载

RegisterStreamSocketListenerAsync(StreamSocketListener)

在给定套接字上为服务异步注册流 (TCP) 套接字侦听器。

RegisterStreamSocketListenerAsync(StreamSocketListener, NetworkAdapter)

在给定的套接字和网络适配器上为服务异步注册 (TCP) 套接字侦听器的流。

RegisterStreamSocketListenerAsync(StreamSocketListener)

在给定套接字上为服务异步注册流 (TCP) 套接字侦听器。

public:
 virtual IAsyncOperation<DnssdRegistrationResult ^> ^ RegisterStreamSocketListenerAsync(StreamSocketListener ^ socket) = RegisterStreamSocketListenerAsync;
/// [Windows.Foundation.Metadata.Overload("RegisterStreamSocketListenerAsync1")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DnssdRegistrationResult> RegisterStreamSocketListenerAsync(StreamSocketListener const& socket);
[Windows.Foundation.Metadata.Overload("RegisterStreamSocketListenerAsync1")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DnssdRegistrationResult> RegisterStreamSocketListenerAsync(StreamSocketListener socket);
function registerStreamSocketListenerAsync(socket)
Public Function RegisterStreamSocketListenerAsync (socket As StreamSocketListener) As IAsyncOperation(Of DnssdRegistrationResult)

参数

socket
StreamSocketListener

描述此服务实例用于侦听新服务客户端的套接字。

返回

成功完成异步操作后,返回描述注册结果的对象。

属性

另请参阅

适用于

RegisterStreamSocketListenerAsync(StreamSocketListener, NetworkAdapter)

在给定的套接字和网络适配器上为服务异步注册 (TCP) 套接字侦听器的流。

public:
 virtual IAsyncOperation<DnssdRegistrationResult ^> ^ RegisterStreamSocketListenerAsync(StreamSocketListener ^ socket, NetworkAdapter ^ adapter) = RegisterStreamSocketListenerAsync;
/// [Windows.Foundation.Metadata.Overload("RegisterStreamSocketListenerAsync2")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DnssdRegistrationResult> RegisterStreamSocketListenerAsync(StreamSocketListener const& socket, NetworkAdapter const& adapter);
[Windows.Foundation.Metadata.Overload("RegisterStreamSocketListenerAsync2")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DnssdRegistrationResult> RegisterStreamSocketListenerAsync(StreamSocketListener socket, NetworkAdapter adapter);
function registerStreamSocketListenerAsync(socket, adapter)
Public Function RegisterStreamSocketListenerAsync (socket As StreamSocketListener, adapter As NetworkAdapter) As IAsyncOperation(Of DnssdRegistrationResult)

参数

socket
StreamSocketListener

描述此服务实例用于侦听新服务客户端的套接字。

adapter
NetworkAdapter

指定此服务用于侦听新服务客户端的网络适配器。

返回

成功完成异步操作后,返回描述注册结果的对象。

属性

另请参阅

适用于