C# Класс Simpl.OODSS.Distributed.Client.WebSocketOODSSClient

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
Blocker ReconnectedBlocker
ReconnectAttemps int
WaitBetweenReconnectAttemps int

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

Метод Описание
ConnectOODSSServerAsync ( ) : Task

establishing the oodss protocol by sending initConnectionRequest

GenerateUid ( ) : long

Generate a uid for the request message

RequestAsync ( RequestMessage request ) : Task

Send Request Message asynchronously and get response

StartAsync ( ) : Task

Starting the client, setting up the websocketclient

StopClient ( ) : Task
WebSocketOODSSClient ( String ipAddress, int portNumber, SimplTypesScope translationScope, Scope objectRegistry ) : System

Initialze a websocket OODSS client object

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

Метод Описание
Connected ( ) : bool
ConnectedImpl ( ) : bool
CreateConnection ( ) : bool
CreatePacketFromMessageAndSend ( RequestQueueObject requestObject ) : Task

prepare the message and send it to the websocket server

GenerateStringFromRequest ( RequestMessage request ) : string

Generate String from requestMessage

PerformDisconnect ( ) : void
ProcessResponse ( ResponseMessage responseMessage ) : void
ProcessString ( string incomingMessage, long incomingUid ) : void

process the incoming message. if it is a response message, add it to unprocessedResponse, if it is an unpdate message, process it immediately

ProcessUpdate ( UpdateMessage updateMessage ) : void
ReceiveMessageWorker ( ) : void

background worker getting response from the blocking queue and process it.

SendMessageWorker ( ) : void

background worker getting request from the blocking queue and send it out.

TranslateStringToServiceMessage ( string incomingMessage ) : ServiceMessage

deserialize the incoming message to service message.

UnableToRestorePreviousConnection ( string sessionId, string newId ) : void
WebSocketDataReceiver ( ) : void

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

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

establishing the oodss protocol by sending initConnectionRequest
public ConnectOODSSServerAsync ( ) : Task
Результат Task

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

Generate a uid for the request message
public GenerateUid ( ) : long
Результат long

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

Send Request Message asynchronously and get response
public RequestAsync ( RequestMessage request ) : Task
request Simpl.OODSS.Messages.RequestMessage request message
Результат Task

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

Starting the client, setting up the websocketclient
public StartAsync ( ) : Task
Результат Task

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

public StopClient ( ) : Task
Результат Task

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

Initialze a websocket OODSS client object
public WebSocketOODSSClient ( String ipAddress, int portNumber, SimplTypesScope translationScope, Scope objectRegistry ) : System
ipAddress String server's ip address
portNumber int server's port number
translationScope Simpl.Serialization.SimplTypesScope TranslationScope for OODSS messages
objectRegistry Scope application object scope
Результат System

Описание свойств

Blocker защищенное свойство

protected ReconnectedBlocker Blocker
Результат ReconnectedBlocker

ReconnectAttemps защищенное свойство

protected int ReconnectAttemps
Результат int

WaitBetweenReconnectAttemps защищенное свойство

protected int WaitBetweenReconnectAttemps
Результат int