Table of Contents

Interface ISocket

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

Provides an interface simplifying the use of asynchronous communication using a socket.

public interface ISocket : IDisposable
Inherited Members

Properties

Connected

Gets a value indicating whether the socket is connected.

bool Connected { get; }

Property Value

bool

RemoteIPAddress

Gets the remote IP address of the socket connection.

string RemoteIPAddress { get; }

Property Value

string

Stream

Gets a stream for reading and writing data.

Stream Stream { get; }

Property Value

Stream

Methods

Accept()

Accepts a connection for the socket.

void Accept()

Authenticate(X509Certificate2)

Authenticates over the socket.

void Authenticate(X509Certificate2 certificate)

Parameters

certificate X509Certificate2

An X509Certificate2 that specifies authentication information.

Bind(EndPoint)

Binds the socket to a local end point.

void Bind(EndPoint localEndPoint)

Parameters

localEndPoint EndPoint

The local end point to which to bind the socket.

Close()

Closes the socket connection.

void Close()

Listen(int)

Starts listening to data received over the socket.

void Listen(int backlog)

Parameters

backlog int

The number of pending connections to process.

Receive(byte[], int)

Receives data over the socket.

void Receive(byte[] buffer, int offset)

Parameters

buffer byte[]

The buffer into which the data will be read.

offset int

The offset into the buffer at which the data will be read.

Send(byte[])

Sends data over the socket.

void Send(byte[] buffer)

Parameters

buffer byte[]

The data to be sent.

Events

AcceptError

Event raised when an error occurs accepting a connection.

event EventHandler<ErrorEventArgs> AcceptError

Event Type

EventHandler<ErrorEventArgs>

Accepted

Event raised when a connection is accepted by the socket.

event EventHandler<AcceptEventArgs> Accepted

Event Type

EventHandler<AcceptEventArgs>

AuthenticateError

Event raised when there is an error authenticating over the socket.

event EventHandler<ErrorEventArgs> AuthenticateError

Event Type

EventHandler<ErrorEventArgs>

Authenticated

Event raised when authentication is completed over the socket.

event EventHandler Authenticated

Event Type

EventHandler

ReceiveError

Event raised when there is an error receiving data.

event EventHandler<ErrorEventArgs> ReceiveError

Event Type

EventHandler<ErrorEventArgs>

Received

Event raised when data is received by the socket.

event EventHandler<ReceivedEventArgs> Received

Event Type

EventHandler<ReceivedEventArgs>

SendError

Event raised when there is an error sending data.

event EventHandler<ErrorEventArgs> SendError

Event Type

EventHandler<ErrorEventArgs>

Sent

Event raised when data is sent through the socket.

event EventHandler Sent

Event Type

EventHandler