---
title: "Websocket Tools - s&box library"
description: "A library that is designed to help simplify the process of interacting with Websockets"
canonical: "https://sbox.watch/zh-cn/libraries/nolankicks/websocket_tools/"
generated_at: "2026-11-27T14:14:25.363Z"
---

# Websocket Tools

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

- 类型: 库
- 标识符: nolankicks.websocket_tools
- 创作者: kicks
- 规范地址: https://sbox.watch/zh-cn/libraries/nolankicks/websocket_tools/
- Markdown: https://sbox.watch/zh-cn/libraries/nolankicks/websocket_tools/index.md
- sbox.game: https://sbox.game/nolankicks/websocket_tools/
- 生成时间: 2026-11-27T14:14:25.363Z

## 统计

- 24小时热度: +0
- Terry 评分: 43%
- 收藏: 2
- 好评: 2
- 差评: 0
- 更新时间: 2024年8月16日
- 创建时间: 2024年7月7日
- 大小: 75.5 KB
- 文件: 23


## 描述

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



## More by kicks

| Package | 标识符 | 玩家 | 收藏 | 好评 | 评分 | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Opium Postprocess | nolankicks.opiumpostprocess | 0 | 5 | 5 | 65% | https://sbox.watch/zh-cn/libraries/nolankicks/opiumpostprocess/index.md |
| Screen Shot Library | nolankicks.screenshotlibrary | 0 | 3 | 2 | 43% | https://sbox.watch/zh-cn/libraries/nolankicks/screenshotlibrary/index.md |
| No Clip Library | nolankicks.noclip | 0 | 3 | 0 | -- | https://sbox.watch/zh-cn/libraries/nolankicks/noclip/index.md |
| Kicks' Component Collection | nolankicks.kickscomponents | 0 | 1 | 0 | -- | https://sbox.watch/zh-cn/libraries/nolankicks/kickscomponents/index.md |
| Scene Loading Utility | nolankicks.sceneloadingutility | 0 | 0 | 0 | -- | https://sbox.watch/zh-cn/libraries/nolankicks/sceneloadingutility/index.md |
