Repository navigation
Releases: AllahPower/WebS
Release list
WebS 2.0.0
What's New
- OOP Architecture: Complete rewrite with Singleton pattern
- Dynamic Events:
WebS.On("EventName", callback)/WebS.Off() - Auto-Reconnect: Exponential backoff with configurable parameters
- New Events:
OnReconnecting,OnReconnected - Security Fixes: Race conditions, memory leaks, stack overflow protection
- Simplified Installation: All DLLs now go to single folder
Installation
All files now go to one folder - no more splitting between game root and moonloader!
Step-by-step:
-
Extract archive to
moonloader/lib/folder.
Full path:.../GTA San Andreas/moonloader/lib/ -
Verify structure:
moonloader/lib/
├── WebS.dll
├── microsoft-signalr.dll
├── cpprest_2_10.dll
├── jsoncpp.dll
├── libcrypto-3.dll
├── libssl-3.dll
├── zlib1.dll
├── brotlicommon.dll
├── brotlidec.dll
└── brotlienc.dll -
Done! Use
require("WebS")in your scripts.
Quick Example
require("WebS")
WebS.On("OnConnect", function()
print("Connected!")
end)
WebS.On("OnError", function(err)
print("Error: " .. err)
end)
WebS.SetReconnect({ enabled = true, maxAttempts = 5 })
WebS.Connect("https://your-server.com/hub")
function main()
while true do
wait(50)
WebS.ProcessEvents()
end
endUpgrading from 1.0.0
- Delete old DLLs from game root folder (gta_sa.exe directory)
- Delete old moonloader/lib/WebS.dll
- Install fresh using instructions above
- Update scripts: Replace WebS.OnConnect = function() with WebS.On("OnConnect", function() ... end)
Full Documentation
See https://github.com/AllahPower/WebS/blob/master/README.md for complete API reference.
Full Changelog: 1.0.0...2.0.0
WebS 1.0.0
To ensure the library works correctly, place the files in the following directories.
Step-by-step:
-
Dependencies:
- Copy all files from the archive (EXCEPT
WebS.dll) to your game root folder (next togta_sa.exe). - These are required system libraries for networking.
- Copy all files from the archive (EXCEPT
-
Library:
- Copy
WebS.dllto themoonloader/lib/folder. - Full path:
.../GTA San Andreas/moonloader/lib/WebS.dll
- Copy
-
Done! You can now use
require "WebS"in your scripts.