Show / Hide Table of Contents

Class WebSocketBuilder

The WebSocketBuilder creates a new WebSocket object which connects to a remote WebSocket.

Inheritance
object
WebSocketBuilder
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: k8s
Assembly: KubernetesClient.dll
Syntax
public class WebSocketBuilder
Remarks

By default, this uses the .NET ClientWebSocket class, but you can inherit from this class and change it to use any class which inherits from WebSocket, should you want to use a third party framework or mock the requests.

Constructors

WebSocketBuilder()

Declaration
public WebSocketBuilder()

Properties

Options

Declaration
public ClientWebSocketOptions Options { get; }
Property Value
Type Description
ClientWebSocketOptions

WebSocket

Declaration
protected ClientWebSocket WebSocket { get; }
Property Value
Type Description
ClientWebSocket

Methods

AddClientCertificate(X509Certificate2)

Declaration
public virtual WebSocketBuilder AddClientCertificate(X509Certificate2 certificate)
Parameters
Type Name Description
X509Certificate2 certificate
Returns
Type Description
WebSocketBuilder

BuildAndConnectAsync(Uri, CancellationToken)

Declaration
public virtual Task<WebSocket> BuildAndConnectAsync(Uri uri, CancellationToken cancellationToken)
Parameters
Type Name Description
Uri uri
CancellationToken cancellationToken
Returns
Type Description
Task<WebSocket>

ExpectServerCertificate(X509Certificate2Collection)

Declaration
public WebSocketBuilder ExpectServerCertificate(X509Certificate2Collection serverCertificate)
Parameters
Type Name Description
X509Certificate2Collection serverCertificate
Returns
Type Description
WebSocketBuilder

SetRequestHeader(string, string)

Declaration
public virtual WebSocketBuilder SetRequestHeader(string headerName, string headerValue)
Parameters
Type Name Description
string headerName
string headerValue
Returns
Type Description
WebSocketBuilder

SkipServerCertificateValidation()

Declaration
public WebSocketBuilder SkipServerCertificateValidation()
Returns
Type Description
WebSocketBuilder
In this article
Back to top Generated by DocFX