Types namespace.
Members
function
Creates a server-side event channel. Server only.
function
Creates a client-side event channel. Client only.
Types namespace
The schema constructor namespace, identical to
require(Flux.Utils.Types). See
Types.These three are the entire public surface. There is no
ReferenceBridge, no unified
constructor, and no Bridge, Buffers or Remotes re-export. Those modules exist but
are internal.Flux.Server()
string
required
The channel identifier. Both sides have to use the exact same string, and matching is
case-sensitive. It is written into every packet, so short names cost fewer bytes.
{ Types.Type }
An optional positional array describing the event’s argument layout. When present, event
payloads skip per-value type tags. See Schemas.
The first call initialises the transport: it creates
Flux_Reliable and
Flux_Unreliable, starts the Heartbeat flush loop, and installs the OnServerEvent
handlers. Requiring the root module does none of that on its own, so at least one
Flux.Server(...) call has to run during server startup or clients will hang waiting for
the remotes.Flux.Client()
string
required
The channel identifier. Has to match the server’s exactly.
{ Types.Type }
An optional positional argument layout. Has to be identical to the server’s schema for
the same name.
The first client call resolves the remotes with
WaitForChild, so it yields until the
server has created them.Exported types
Both types are generic over two type packs, each defaulting to(...any).
type pack
default:"(...any)"
The arguments the event carries.
type pack
default:"(...any)"
The values an invocation returns.
Asymmetries in the type definitions
These are not oversights. They reflect what Flux actually implements.Usage with generics
Next steps
Server
Every server method in detail.
Client
Every client method in detail.
