Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@socialgorithm/game-server
Advanced tools
Creates a socket server (default port 5433) that serves games. To use this server, you provide functions that will be called on game or player actions, and call functions to communicate with players or to broadcast game state to spectators.
If you have no idea what any of this means, start at our homepage or tournament documentation
Install the dependency:
npm install @socialgorithm/game-server
Start the game server and supply a new match function:
new GameServer({ name: "My Game Name" }, newMatchFunction, { port: 5433 });
The new match function:
Match
interface (i.e. must implement callback to listen for player communication).MatchOptions
newMatchFunction(createMatchMessage: Messages.CreateMatchMessage, outputChannel: MatchOutputChannel) {
debug("Started new match");
return new MyMatch(createMatchMessage.options, createMatchMessage.players, outputChannel);
}
In your game, you can then use MatchOutputChannel
to communicate with players or spectators (e.g. the Tournament Server).
See tic-tac-toe-game-server for an example of integration.
The rest of this guide is for contributors.
To publish to NPM, make sure you've incremented the version number (e.g. npm version patch
) and run:
npm publish
FAQs
JS Game Server library
We found that @socialgorithm/game-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.