C# Class Simpl.OODSS.Distributed.Client.WebSocketOODSSClient

Show file Open project: ecologylab/simplCSharp Class Usage Examples

Protected Properties

Property Type Description
Blocker ReconnectedBlocker
ReconnectAttemps int
WaitBetweenReconnectAttemps int

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

ConnectOODSSServerAsync() public method

establishing the oodss protocol by sending initConnectionRequest
public ConnectOODSSServerAsync ( ) : Task
return Task

GenerateUid() public method

Generate a uid for the request message
public GenerateUid ( ) : long
return long

RequestAsync() public method

Send Request Message asynchronously and get response
public RequestAsync ( RequestMessage request ) : Task
request Simpl.OODSS.Messages.RequestMessage request message
return Task

StartAsync() public method

Starting the client, setting up the websocketclient
public StartAsync ( ) : Task
return Task

StopClient() public method

public StopClient ( ) : Task
return Task

WebSocketOODSSClient() public method

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
return System

Property Details

Blocker protected property

protected ReconnectedBlocker Blocker
return ReconnectedBlocker

ReconnectAttemps protected property

protected int ReconnectAttemps
return int

WaitBetweenReconnectAttemps protected property

protected int WaitBetweenReconnectAttemps
return int