Websocket Tools
kicks kicks Library update 2y ago

Websocket Tools

A library that is designed to help simplify the process of interacting with Websockets

favorite2favorites
thumb_up2upvotes
hard_drive 0 MB folder 23 files build Engine v17 history Last update 738d ago
open_in_new View on sbox.game

About This Package

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 )
}

Media (3)

No usage statistics available
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
Package ID: nolankicks.websocket_tools
Created: 2024-07-07 20:50 UTC
Updated: 2024-08-16 17:16 UTC
Type: library
Public: Yes
Version: 66501
files: 23
Size: 0.1 MB
Engine Version: 17
Asset Version ID: 66501
Version Created: 2024-08-16 17:16 UTC
Hash: 3531929433778513325
Manifest: Open manifest
Cs Proj Name:
Resources:
Code Package References:
new_releases Latest Update Aug 16, 2024
Changes on 2024-08-16
66501 Aug 16, 2024
Changes on 2024-08-16
66499 Aug 16, 2024
Changes on 2024-08-16
66498 Aug 16, 2024
Changes on 2024-08-16
66496 Aug 16, 2024
Changes on 2024-08-16
66207 Aug 15, 2024
Changes on 2024-08-15
66151 Aug 14, 2024
Try to fix json tags
59986 Jul 8, 2024
Changes on 2024-07-08
59942 Jul 7, 2024
Changes on 2024-07-07
59941 Jul 7, 2024
Changes on 2024-07-07
59940 Jul 7, 2024
Changes on 2024-07-07