Configuration & Low-Level API
The built-in protections that apply automatically, how to tune them, and the original string-keyed networking API for quick one-off events.
Rate Limiting & Timeouts
Two protections apply automatically to every Client method/Signal (and to the
low-level Channel.On/SetFunction), without you having to
configure anything:
-
Per-player token buckets: each Remote starts with a bounded burst capacity
and refills continuously. Default limits are
Channel.DefaultRateLimit = 30/sec for Signals andChannel.DefaultInvokeRateLimit = 20/sec for Methods — override per-service withRateLimit/InvokeRateLimitfields onThread.CreateService({...}), or globally viaChannel.Configure({...}). Signals are dropped when empty. Methods receive a structuredRATE_LIMITEDerror, and warning output is throttled. - Payload limits: wrapped calls default to 64 KiB and reject oversized, cyclic, or unsupported payloads before user handlers run.
-
Channel.InvokeClienttimeout: server-to-clientInvokeClientcalls give up afterChannel.InvokeClientTimeoutseconds (default 10) instead of hanging forever if the client is unresponsive or disconnects mid-call.
InvokeServer calls (i.e. calling a Client Method from the
client) — that's standard Roblox behavior, not something Thread adds protection for.
If you need one, wrap the call:
Promise.new(function(resolve) resolve(MyService:SomeMethod()) end):timeout(5).
Configuration
Thread.Configure({
Debug = true, -- verbose [Thread]/[Channel] logging, off by default
HaltOnCriticalFailure = false, -- see Dependencies, Middleware & Failure
})
Channel.Configure({
DefaultRateLimit = 60,
DefaultInvokeRateLimit = 30,
DefaultMaxPayloadBytes = 65536,
InvokeClientTimeout = 15,
WaitTimeout = 15, -- how long the client waits for server-created Remotes to appear
})
Call Thread.Configure/Channel.Configure once, early, before
Thread.Start(). Debug = true is genuinely useful while
developing — it prints every service registration, remote creation, and lifecycle
step — but noisy in production, hence the false default.
The Low-Level Channel API
For quick, one-off networking that doesn't belong to any particular service's
Client table — this is the original string-keyed API, unchanged from the
original v1.1.1 project:
-- Server
Channel.On("PlayerJumped", function(player)
print(player.Name, "jumped")
end)
-- Client
Channel.FireServer("PlayerJumped")
| Function | Direction | Description |
|---|---|---|
Channel.On(name, callback, rateLimit?) | both | Listens for a RemoteEvent. Server callback gets (player, ...); client gets (...). |
Channel.FireClient(name, player, ...) | server → one client | |
Channel.FireAll(name, ...) | server → all clients | |
Channel.FireServer(name, ...) | client → server | |
Channel.SetFunction(name, callback, rateLimit?) | both | Sets up a RemoteFunction handler. |
Channel.InvokeServer(name, ...) | client → server | Yields for the return value. |
Channel.InvokeClient(name, player, ...) | server → client | Yields, with a timeout. |
Channel.Event(name) / Channel.Function(name) | same-context only | Raw BindableEvent/BindableFunction. Only useful server↔server or client↔client — Bindables never cross the network boundary. |
Reach for the Client table approach first; use this low-level API when a
full service Client entry feels like overkill for a single throwaway
event.