GWSockets
A C++ module that adds WebSocket functionality to Garry's Mod.
Features
A nice and simple to use interface to WebSockets
Built in SSL support by simply using wss:// in the URL instead of ws://
Reusable sockets. A socket that has been disconnected can be reopened using the same settings
WebSockets support using cookies and http headers, which can be used for authenticating
Written from scratch and completely independent from any other socket module out there
High performance implementation based on asynchronous I/O
Automatic update check. Notifies users if an update for the module is available
No additional libraries required. Drop the GWSockets dll into your lua/bin folder and you're read to go
Installation
Place either gmsv_gwsockets_win32.dll (Windows) or gmsv_gwsockets_linux.dll (Linux) into your GarrysMod/lua/bin folder.
NOTE: Even though this module is mainly aimed at servers, it can also be used on clients. Just rename the module to gmcl_gwsockets_os and it will work on clientside as well.
Documentation
Documentation for the module can be found on the project's GitHub page.
Examples
Examples for how to use the module can be found here.
More complex examples will be added soon, feel free to open a pull request if you have one that you want to share.
Download
Prebuilt binaries are available for both Windows and Linux. A Mac OS X version might be added the the future.
The latest release of this module can be found on the GitHub release page of GWSockets.
Notes
When verifying certificates the module does not currently check if a certificate has been revoked (all other certificate checks should work). This is planned for a future release.
This module relies on Garry's Mod's Think hook, which means sockets will not function while the server is hibernating
Currently only websocket clients are implemented. If there is demand I might implement a websocket server in this module too.
The module has just been released so there might be bugs. Please report them on the GitHub Issues page.
Sorry, you need to Log In to post a reply to this thread.