Roblox Networking Library (RbxNet)

Roblox Networking Library

What is Net?

Net is a networking library built in roblox-ts for Roblox, which simplifies the creation and management of doing networking in Roblox. Basic usage can be seen here.

Features

  • Creation & Usage of remotes through “IDs”. The actual remotes are managed by Net.
  • More explicit, contextual APIs. Server objects are explicitly for the server, Client objects explicitly for the client.
  • Asynchronous remote functions (Net*AsyncFunction) - Which unlike regular remote functions allow timeouts and safely calling clients without issues.
  • Asynchronous methods - part of being a roblox-ts built library is the support for Promise.
  • Caching - Results from RemoteFunctions can be cached on the client for a set amount of time.
  • Throttling - RemoteFunctions and RemoteEvents can be set to throttle requests.
  • Type Safety - Using a library such as t, you can explicitly set what your RemoteFunctions/RemoteEvents accept as valid arguments. Any invalid arguments will be discarded.
  • GlobalServerEvents - Special RemoteEvent-like objects that use MessagingService to communicate cross-server. Limitations of MessagingService are automatically handled through it.
  • Serialization Helpers - Net.Serialize, Net.Deserialize, Net.IsSerializable

Installing Net

Lua

The Lua source code can be obtained here. You can also grab it from releases.

TypeScript (roblox-ts)

The TypeScript version of Net requires [email protected] or higher and can be installed via NPM.

npm i @rbxts/net

Then Net can be used in your typescript code like such:

import Net from "@rbxts/net";

GitHub (source)

Documentation

https://roblox-aurora.github.io/rbx-net/
(I am working on documentation still at the moment - do be aware)

4 Likes