C# Класс WebSocketSharp.Server.WebSocketServerBase

Provides the basic functions of the server that receives the WebSocket connection requests.
The WebSocketServerBase class is an abstract class.
Показать файл Открыть проект

Открытые методы

Метод Описание
Start ( ) : void

Starts to receive the WebSocket connection requests.

Stop ( ) : void

Stops receiving the WebSocket connection requests.

Защищенные методы

Метод Описание
AcceptWebSocket ( TcpListenerWebSocketContext context ) : void

Accepts a WebSocket connection request.

WebSocketServerBase ( ) : System

Initializes a new instance of the WebSocketServerBase class.

This constructor initializes a new instance of this class as non self hosted server.

WebSocketServerBase ( IPAddress address, int port, string servicePath, bool secure ) : System

Initializes a new instance of the WebSocketServerBase class that listens for incoming connection attempts on the specified address, port, servicePath and secure.

WebSocketServerBase ( System.Logger logger ) : System

Initializes a new instance of the WebSocketServerBase class with the specified logger.

This constructor initializes a new instance of this class as non self hosted server.

WebSocketServerBase ( string url ) : System

Initializes a new instance of the WebSocketServerBase class that listens for incoming connection attempts on the specified WebSocket URL.

Приватные методы

Метод Описание
init ( ) : void
init ( Uri uri ) : void
processRequestAsync ( TcpClient client ) : void
receiveRequest ( ) : void
startReceiveRequestThread ( ) : void
tryCreateUri ( string uriString, Uri &result, string &message ) : bool

Описание методов

AcceptWebSocket() защищенный абстрактный Метод

Accepts a WebSocket connection request.
protected abstract AcceptWebSocket ( TcpListenerWebSocketContext context ) : void
context WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext /// A that contains the WebSocket connection request objects. ///
Результат void

Start() публичный Метод

Starts to receive the WebSocket connection requests.
public Start ( ) : void
Результат void

Stop() публичный Метод

Stops receiving the WebSocket connection requests.
public Stop ( ) : void
Результат void

WebSocketServerBase() защищенный Метод

Initializes a new instance of the WebSocketServerBase class.
This constructor initializes a new instance of this class as non self hosted server.
protected WebSocketServerBase ( ) : System
Результат System

WebSocketServerBase() защищенный Метод

Initializes a new instance of the WebSocketServerBase class that listens for incoming connection attempts on the specified address, port, servicePath and secure.
/// Either or is . /// /// is 0 or less, or 65536 or greater. /// /// /// is invalid. /// /// /// -or- /// /// /// Pair of and is invalid. /// ///
protected WebSocketServerBase ( IPAddress address, int port, string servicePath, bool secure ) : System
address System.Net.IPAddress /// A that contains a local IP address. ///
port int /// An that contains a port number. ///
servicePath string /// A that contains an absolute path. ///
secure bool /// A that indicates providing a secure connection or not. /// (true indicates providing a secure connection.) ///
Результат System

WebSocketServerBase() защищенный Метод

Initializes a new instance of the WebSocketServerBase class with the specified logger.
This constructor initializes a new instance of this class as non self hosted server.
protected WebSocketServerBase ( System.Logger logger ) : System
logger System.Logger /// A that provides the logging functions. ///
Результат System

WebSocketServerBase() защищенный Метод

Initializes a new instance of the WebSocketServerBase class that listens for incoming connection attempts on the specified WebSocket URL.
/// is . /// /// is invalid. ///
protected WebSocketServerBase ( string url ) : System
url string /// A that contains a WebSocket URL. ///
Результат System