WebSocketクライアント

概要

WebSocketクライアントを表します。

シグネチャー

1
public class WebSocketClient

 

名前空間

cAlgo.API

メソッド

Connect

概要

指定したURIにWebSocketClientを接続します。

シグネチャー

1
public void Connect(Uri uri)

 

パラメーター

名前説明
uriUriサーバーのURI。

戻り値

void

Close

概要

クローズ状態/理由を取得します。

シグネチャー

1
public void Close(WebSocketClientCloseStatus closeStatus, string closeStatusDescription)

 

パラメーター

名前説明
closeStatusWebSocketClientCloseStatus 
closeStatusDescriptionstring 

戻り値

void

Send (2)

Send (1 of 2)

概要

指定されたテキストを送信します。

シグネチャー

1
public void Send(string text)

 

パラメーター

名前説明
textstring送信するテキスト。

戻り値

void

Send (2 of 2)

概要

指定されたバイナリデータを送信します。

シグネチャー

1
public void Send(byte[] data)

 

パラメーター

名前説明
databyte[]送信するデータ。

戻り値

void

Dispose

概要

WebSocketClientインスタンスによって使用されているアンマネージドリソースを解放します。

シグネチャー

1
public void Dispose()

 

戻り値

void

Properties

State

Summary

Gets the current state of the WebSocketClient instance.

Signature

1
public WebSocketClientState State {get;}

 

Return Value

WebSocketClientState

CloseStatus

Summary

Gets the close status or reason.

Signature

1
public WebSocketClientCloseStatus? CloseStatus {get;}

 

Return Value

WebSocketClientCloseStatus?

CloseStatusDescription

Summary

Gets a description of the reason why the instance was closed.

Signature

1
public string CloseStatusDescription {get;}

 

Return Value

string

Events

Connected

Summary

Occurs when WebSocketClient is connected.

Signature

1
public event Action<WebSocketClientConnectedEventArgs> Connected;

 

Disconnected

Summary

Occurs when WebSocketClient is disconnected.

Signature

1
public event Action<WebSocketClientDisconnectEventArgs> Disconnected;

 

TextReceived

Summary

Occurs when WebSocketClient receives text data.

Signature

1
public event Action<WebSocketClientTextReceivedEventArgs> TextReceived;

 

BinaryReceived

Summary

Occurs when WebSocketClient receives binary data.

Signature

1
public event Action<WebSocketClientBinaryReceivedEventArgs> BinaryReceived;

 

  • WebSocket Client

 

目次

このページについて