C# Client  0.0.0.7
C# Library to interface with Corelink
CoreLink.CorelinkWebSocket Class Reference

Inherits CoreLink.ControlStream.

Public Member Functions

 CorelinkWebSocket (string serverURL)
 Initializes a new instance of the T:WsClient class. More...
 
async Task connect ()
 Method which connects client to the server. More...
 
override void stopConnection ()
 
bool isConnecting ()
 Return if is connecting to the server. More...
 
bool isConnectionOpen ()
 Return if connection with server is open. More...
 
override void sendMessage (string message)
 Method used to send a message to the server. More...
 
string getResponse ()
 

Static Public Member Functions

static string streamToString (MemoryStream ms, Encoding encoding)
 Converts memory stream into string. More...
 

Properties

ConcurrentQueue< String > receiveQueue [get]
 
BlockingCollection< ArraySegment< byte > > sendQueue [get]
 

Detailed Description

Definition at line 16 of file CorelinkWebSocket.cs.

Constructor & Destructor Documentation

◆ CorelinkWebSocket()

CoreLink.CorelinkWebSocket.CorelinkWebSocket ( string  serverURL)

Initializes a new instance of the T:WsClient class.

Parameters
serverURLServer URL.

Definition at line 42 of file CorelinkWebSocket.cs.

Member Function Documentation

◆ connect()

async Task CoreLink.CorelinkWebSocket.connect ( )

Method which connects client to the server.

Returns
The connect.

Definition at line 66 of file CorelinkWebSocket.cs.

◆ getResponse()

string CoreLink.CorelinkWebSocket.getResponse ( )

Definition at line 143 of file CorelinkWebSocket.cs.

◆ isConnecting()

bool CoreLink.CorelinkWebSocket.isConnecting ( )

Return if is connecting to the server.

Returns
true, if is connecting to the server, false otherwise.

Definition at line 113 of file CorelinkWebSocket.cs.

◆ isConnectionOpen()

bool CoreLink.CorelinkWebSocket.isConnectionOpen ( )

Return if connection with server is open.

Returns
true, if connection with server is open, false otherwise.

Definition at line 122 of file CorelinkWebSocket.cs.

◆ sendMessage()

override void CoreLink.CorelinkWebSocket.sendMessage ( string  message)
virtual

Method used to send a message to the server.

Parameters
messageMessage.

Implements CoreLink.ControlStream.

Definition at line 135 of file CorelinkWebSocket.cs.

◆ stopConnection()

override void CoreLink.CorelinkWebSocket.stopConnection ( )
virtual

Implements CoreLink.ControlStream.

Definition at line 97 of file CorelinkWebSocket.cs.

◆ streamToString()

static string CoreLink.CorelinkWebSocket.streamToString ( MemoryStream  ms,
Encoding  encoding 
)
static

Converts memory stream into string.

Returns
The string.
Parameters
msMemory Stream.
encodingEncoding.

Definition at line 281 of file CorelinkWebSocket.cs.

Property Documentation

◆ receiveQueue

ConcurrentQueue<String> CoreLink.CorelinkWebSocket.receiveQueue
get

Definition at line 31 of file CorelinkWebSocket.cs.

◆ sendQueue

BlockingCollection<ArraySegment<byte> > CoreLink.CorelinkWebSocket.sendQueue
get

Definition at line 32 of file CorelinkWebSocket.cs.


The documentation for this class was generated from the following file: