search/
Start typing to search packages!
package_2
remote
By @post-ill
Roblox
Mirroredremote
remote is a general purpose, minimal remote abstraction for Roblox.
Installation
remote is available on wally, so on pesde. You can also just go to the latest release, pick the script and drop it into your project.
Usage
-- shared
do
local remote = require(path.to.remote)
return remote.new({
name = "attack/entity",
param = function(data)
return type(data) == "number"
end
})
end
-- client/server
-- as an event...
do
local event = require(path.to.your.event)
event:connect(function(...)
-- Use data here
end)
event:fire(...)
end
-- or as a function
do
local fn = require(path.to.your.fn)
fn:connect(function(...)
return yourData
end)
local ok, received = fn:invoke(...)
end
Schemas
remote uses schemas to validate outgoing and incoming data, which are in the form of (any) -> string?. It's strongly
recomended to use schema for this case.
API
| function | description |
|---|---|
remote.new(cfg) | creates a remote based on cfg config |
remote:connect(fn) | binds fn callback to be executed on every remote remote:fire |
remote:fire(...v) | calls remote connections made passing ...v data |
remote:invoke(...v) | calls remote handler passing ...v data and yields until callee calls back. Returns the response sent by the counterparty |
Issues
Feel free to open an issue if you find out that the library is not behaving as expected.
Package Details
Install command (Click to copy)
Version
1.0.0
License
Unlicense
Safe for commercial use
The package archive does not include its license text; the license is declared in its manifest metadata.
Automated license review — not legal advice.
