Skip to content

Files

Latest commit

9b5a457 · Mar 21, 2025

History

History
executable file
·
43 lines (35 loc) · 1.65 KB

README.md

File metadata and controls

executable file
·
43 lines (35 loc) · 1.65 KB

SourceMod WebSocket Extension

What is this?

This is a SourceMod extension that provides some methods for HTTP JSON and websocket communication

Features

  • Relies on YYJSON which A high performance JSON library written in ANSI C
  • Relies on IXWebSocket which is C++ library for WebSocket client and server development. It has minimal dependencies
  • Support TEXT and JSON data
  • Support client and server
  • Support permessage-deflate
  • Support SSL
  • Support x64

How to build this?

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install clang g++-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev libssl-dev:i386
clone project
mkdir build && cd build
python ../configure.py --enable-optimize --symbol-files --sm-path=YOU_SOURCEMOD_PATH --targets=x86,x64
ambuild

Native

Binary files

TODO

  • WebSocket server support
  • Windows support
  • HTTP support? (Because this is a WebSocket library I might not support it)

NOTES

  • HTTP functionality is not yet complete. Currently, only basic features are available
  • Server will not process data during the hibernation. You can set sv_hibernate_when_empty to 0 to disable hibernation

Example