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.
- Creation & Usage of remotes through “IDs”. The actual remotes are managed by Net.
- More explicit, contextual APIs.
Serverobjects are explicitly for the server,
Clientobjects 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
- 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
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";
(I am working on documentation still at the moment - do be aware)