Table of Contents

Interface IWebSocketConnection

Namespace
OpenQA.Selenium.Safari.Internal
Assembly
WebDriver.dll

Provides an interface describing a connection to a WebSocket.

public interface IWebSocketConnection

Properties

ConnectionInfo

Gets an IWebSocketConnectionInfo object describing the connection.

IWebSocketConnectionInfo ConnectionInfo { get; }

Property Value

IWebSocketConnectionInfo

Methods

Close()

Closes the connection.

void Close()

Send(byte[])

Sends a binary message over the connection.

void Send(byte[] message)

Parameters

message byte[]

The binary message to send.

Send(string)

Sends a text message over the connection.

void Send(string message)

Parameters

message string

The text message to send.

SendRaw(string)

Sends raw text over the connection, without passing through a handler.

void SendRaw(string message)

Parameters

message string

The message to send.

Events

BinaryMessageReceived

Event raised when a binary message is received via the connection.

event EventHandler<BinaryMessageHandledEventArgs> BinaryMessageReceived

Event Type

EventHandler<BinaryMessageHandledEventArgs>

Closed

Event raised when a connection is closed.

event EventHandler<ConnectionEventArgs> Closed

Event Type

EventHandler<ConnectionEventArgs>

ErrorReceived

Event raised when an error occurs via the connection.

event EventHandler<ErrorEventArgs> ErrorReceived

Event Type

EventHandler<ErrorEventArgs>

MessageReceived

Event raised when a text message is received via the connection.

event EventHandler<TextMessageHandledEventArgs> MessageReceived

Event Type

EventHandler<TextMessageHandledEventArgs>

Opened

Event raised when a connection is opened.

event EventHandler<ConnectionEventArgs> Opened

Event Type

EventHandler<ConnectionEventArgs>

Sent

Event raised when data is sent via the connection.

event EventHandler Sent

Event Type

EventHandler

StandardHttpRequestReceived

Event raised when a non-WebSocket message is received.

event EventHandler<StandardHttpRequestReceivedEventArgs> StandardHttpRequestReceived

Event Type

EventHandler<StandardHttpRequestReceivedEventArgs>