channel

Retrieves an existing communication channel by name.

Function

Synopsis

mux.comsys.channel( name )

Arguments

string name
An existing channel name without embedded NUL bytes. Lookup is case-insensitive.

Returns

Channel channel
A live handle for the channel. Channel:name() returns its canonical spelling.

Raises

  • mux.unavailable.checking during @lua/check.
  • mux.arg.invalid when the name contains an embedded NUL byte.
  • mux.channel.invalid when the channel does not exist.

Example

local public = mux.comsys.channel("Public")

See Also