ClientWebSocketFactory.CreateWebSocket 方法

定义

创建指定连接的新网络套接字。

public:
 abstract System::Net::WebSockets::WebSocket ^ CreateWebSocket(System::IO::Stream ^ connection, System::ServiceModel::Channels::WebSocketTransportSettings ^ settings);
public abstract System.Net.WebSockets.WebSocket CreateWebSocket (System.IO.Stream connection, System.ServiceModel.Channels.WebSocketTransportSettings settings);
abstract member CreateWebSocket : System.IO.Stream * System.ServiceModel.Channels.WebSocketTransportSettings -> System.Net.WebSockets.WebSocket
Public MustOverride Function CreateWebSocket (connection As Stream, settings As WebSocketTransportSettings) As WebSocket

参数

connection
Stream

Web 套接连接。

settings
WebSocketTransportSettings

网络套接字设置。

返回

一个新 WebSocket 对象。

适用于