Skip to content

Instantly share code, notes, and snippets.

@AbigailBuccaneer
Last active March 14, 2019 14:58
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AbigailBuccaneer/5943024 to your computer and use it in GitHub Desktop.
Save AbigailBuccaneer/5943024 to your computer and use it in GitHub Desktop.
State of Socket APIs for Garry's Mod 13

Socket APIs for Garry's Mod 13

There are several different Socket APIs for Garry's Mod. They all have slightly different APIs, and for many of them it's unclear if they work at all in Garry's Mod 13.

LuaSocket is 'the original' socket API for Lua. It has a very simple API that closely matches the POSIX sockets API, plus some goodies thrown in (e.g. HTTP layer, MIME type handling).

While LuaSocket doesn't support Garry's Mod, it probably wouldn't be hard to create a Garry's Mod fork of it. This has the advantages of having a high-quality library and universally-recognised API, but it would involve maintenance of a binary module.

Latest version is 2.0.2, released 2007-10-13.

gm_glsock is an asynchronous C++-based socket system for Garry's Mod. Under the hood it uses Boost.Asio. This seems to be the only current socket API for Garry's Mod, as the creator of OOSocks recommends the use of gm_glsock instead.

Latest version is SVN r74, 2012-12-19 (after Garry's Mod 13 was released).

deprecated, not maintained, developer recommends gm_glsock.

Successful port of LuaSocket to Garry's Mod. No longer maintained.

Intended as a more lightweight socket library, gm_litesocket is single-threaded and dead simple. It's currently used by Wire Socket Radios. It claims to work in Garry's Mod 13 but hasn't been updated since 13 was still in beta. Its API closely matches POSIX sockets.

Forum thread last updated 2012-10-20 (before Garry's Mod 13 came out of beta).

@MattJeanes
Copy link

@azarus
Copy link

azarus commented Apr 11, 2015

https://github.com/azarus/GMSocks
It has only basic UDP support right now, since it is my first extension but i can guarantee that at least it works with GM13 without any issues.

@AMD-NICK
Copy link

AMD-NICK commented Dec 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment