A fast and minimal socket plugin for SA-MP (San Andreas Multiplayer), designed to run without SSL and provide simple TCP/UDP communication capabilities for SA-MP scripts.
- Lightweight & minimal
- SSL-free build (for security-paranoid or minimalist environments)
- Easy to compile on Linux and Windows
- Compatible with most modern AMX-based SA-MP scripts
The original BlueG Socket plugin had a major drawback β it relied on OpenSSL (libcrypto, libeay32.dll, ssleay32.dll) which caused runtime issues on both Linux and Windows:
Failed (libcrypto.so.0.9.8: cannot open shared object file: No such file or directory)This application failed to start because libeay32.dll and ssleay32.dll were not found.These external dependencies were either missing, incompatible, or flagged by antivirus software. Most users had no idea how to get the right versions or where to place them.
I rebuilt the plugin from source and completely removed OpenSSL, eliminating these issues:
- π« No more
libcryptodependency on Linux - π« No more
libeay32.dll/ssleay32.dllneeded on Windows - β Just drop the plugin and it works β no DLLs, no errors, no headaches
This makes the plugin lightweight, portable, and production-ready, especially for custom backend communication (e.g., Node.js, Python, etc.).
Built to make your SA-MP experience smoother. π‘
- SA-MP Server (0.3.7 or later)
- Visual C++ Redistributable (if using Windows DLL)
socket.inc: Place it in yourpawno/includefolder
-
Download the latest
socket.dllfrom the Releases page. -
Copy
socket.dllto your SA-MP server'spluginsfolder -
Copy
socket.inctopawno/include/ -
Add
socketto yourserver.cfgplugins line:plugins socket
-
Download
socket.sofrom the Releases page. -
Copy
socket.soto yourpluginsfolder -
Copy
socket.inctopawno/include/ -
Update
server.cfg:plugins socket.so
Make sure the plugin file has execute permissions:
chmod +x plugins/socket.sog++make
git clone https://github.com/RJRYT/samp-socket-plugin.git
cd samp-socket-plugin/socket
makeOutput: Release/socket.so
- Visual Studio Build Tools
MSBuildCLI (included in Build Tools)
git clone https://github.com/RJRYT/samp-socket-plugin.git
msbuild "absolute\path\to\socket.vcxproj" /p:Configuration=Release /p:Platform=Win32Output: Release/socket.dll
#include <socket>
new Socket:g_socket;
public OnGameModeInit()
{
g_socket = socket_create(TCP);
socket_connect(g_socket, "127.0.0.1", 7000);
}
public onSocketAnswer(Socket:id, data[], data_len)
{
printf("[TCP Server] %s", data);
}This project is licensed under the MIT License. See LICENSE for more info.
Find prebuilt binaries for Windows and Linux under Releases
We recommend using GitHub Releases for cleaner version management without bloating the repo size.
Feel free to fork and PR! For bugs, open a GitHub issue with detailed info. Contributions are always welcome.
- Discord: RJRYT
- GitHub: github.com/RJRYT