Table of Contents

Interface IHandler

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

Provides an interface for handling communication over the WebSocket connection.

public interface IHandler

Methods

CreateBinaryFrame(byte[])

Creates a frame for binary messages in the WebSocket protocol.

byte[] CreateBinaryFrame(byte[] frameData)

Parameters

frameData byte[]

The binary data of the message.

Returns

byte[]

A byte array containing the message frame.

CreateCloseFrame(int)

Creates a frame for close messages in the WebSocket protocol.

byte[] CreateCloseFrame(int code)

Parameters

code int

The connection close code of the message.

Returns

byte[]

A byte array containing the message frame.

CreateHandshake()

Creates a handshake message for initiating connections.

byte[] CreateHandshake()

Returns

byte[]

A byte array containing the handshake message.

CreateTextFrame(string)

Creates a frame for text messages in the WebSocket protocol.

byte[] CreateTextFrame(string text)

Parameters

text string

The text of the message.

Returns

byte[]

A byte array containing the message frame.

ProcessData(IEnumerable<byte>)

Processes data received by the connection.

void ProcessData(IEnumerable<byte> data)

Parameters

data IEnumerable<byte>

The data to be processed.

Events

BinaryMessageHandled

Event raised when a binary message is processed by the handler.

event EventHandler<BinaryMessageHandledEventArgs> BinaryMessageHandled

Event Type

EventHandler<BinaryMessageHandledEventArgs>

CloseHandled

Event raised when a close message is processed by the handler.

event EventHandler CloseHandled

Event Type

EventHandler

TextMessageHandled

Event raised when a text message is processed by the handler.

event EventHandler<TextMessageHandledEventArgs> TextMessageHandled

Event Type

EventHandler<TextMessageHandledEventArgs>