Websocket Tools
by
kicks
| Summary | A library that is designed to help simplify the process of interacting with Websockets |
|---|---|
| Description |
About Websocket Tools This library is designed to help simplify the process of interacting with Websockets. You are able to serialize text into a json or send a string. Source: https://github.com/Nolankicks/sbox-websocket-tools API public class WebsocketTools { //The websocket URL string url; //Where you want to fetch from the websocket, not used in Send() public enum Fetch { OnUpdate, OnFixedUpdate, OnStart, } //An action called when a message is recived from the websocket public delegate void OnMessageReceived( string message ); //A game resource that holds Json or string data to be send to the Websocket public WebsocketMessage message; } public class WebSocketUtility { //Sends a message over a websocket connection public static async Task SendAsync( WebsocketTools websocketTools ); //Sends a string over a websocket connection public static async Task SendStringAsync( string url, string message ) }About Websocket Tools
This library is designed to help simplify the process of interacting with Websockets.
You are able to serialize text into a json or send a string.
Source: https://github.com/Nolankicks/sbox-websocket-tools
API
public class WebsocketTools
{
//The websocket URL
string url;
//Where you want to fetch from the websocket, not used in Send()
public enum Fetch
{
OnUpdate,
OnFixedUpdate,
OnStart,
}
//An action called when a message is recived from the websocket
public delegate void OnMessageReceived( string message );
//A game resource that holds Json or string data to be send to the Websocket
public WebsocketMessage message;
}
public class WebSocketUtility
{
//Sends a message over a websocket connection
public static async Task SendAsync( WebsocketTools websocketTools );
//Sends a string over a websocket connection
public static async Task SendStringAsync( string url, string message )
}
|
| Votes | 👍2 👎0 ❤️2 |
| Error Rate | 0% |
| Data | {} |
| Version | Created | Size (modified) | Files | Changes |
|---|---|---|---|---|
| 66501 | 75.5 KB (5.3 KB) | 23 ~1 | Changes on 2024-08-16 | |
| 66499 | 75.3 KB (5.2 KB) | 23 ~1 | Changes on 2024-08-16 | |
| 66498 | 75.3 KB (5.2 KB) | 23 +1 ~1 -7 | Changes on 2024-08-16 | |
| 66496 | 236.1 KB (221.8 KB) | 29 ~17 | Changes on 2024-08-16 | |
| 66207 | 235.9 KB (221.6 KB) | 29 ~17 | Changes on 2024-08-15 | |
| 66151 | 233.6 KB (227.9 KB) | 29 +23 ~1 | Try to fix json tags | |
| 59986 | 10 KB (4.3 KB) | 6 ~1 | Changes on 2024-07-08 | |
| 59942 | 9.8 KB (50 B) | 6 +1 -5 | Changes on 2024-07-07 | |
| 59941 | 21.4 KB (4.1 KB) | 10 ~1 | Changes on 2024-07-07 | |
| 59940 | 21.3 KB | 10 +10 | Changes on 2024-07-07 |
Loading history…