To connect to your Coronium Chatterbox instance, you will first need your IP address (see Installation) then add the following:

Note

The code below shows the minimum parameters needed to connect to a fresh Coronium Chatterbox instance.

cb:connect({
  host = '<your-ip-address>',
  name = 'Sandy'
})

Example

local cb = require('plugin.chatterbox')

local function onConnect()
  print('connected')
end

local function onClosed()
  print('disconnected')
end

local function onError(evt)
  if evt.error then
    print(evt.error)
  end
end

cb.events:addEventListener('OnConnect', onConnect)
cb.events:addEventListener('OnClosed', onClosed)
cb.events:addEventListener('OnError', onError)

cb:connect({
  host = '<your-ip-address>'
  name = 'Sandy'
})

Parameters

Parameter Description Required
host The instance address. Y
name The client display name. Y
port The instance port. N
key The authentication key. N
room The initial room to connect to. N
debug Output client-side debugging info. N

See also: Server Configuration.