Home Previous Up Next Index

Murmur::ServerCallback

Overview

interface ServerCallback

Callback interface for servers. You can supply an implementation of this to receive notification messages from the server. If an added callback ever throws an exception or goes away, it will be automatically removed. Please note that all callbacks are done asynchronously; murmur does not wait for the callback to complete before continuing processing. Note that callbacks are removed when a server is stopped, so you should have a callback for MetaCallback::started which calls Server::addCallback.

See Also

MetaCallback
Server::addCallback

Operation Index

playerConnected
Called when a player connects to the server.
playerDisconnected
Called when a player disconnects from the server.
playerStateChanged
Called when a player state changes.
channelCreated
Called when a new channel is created.
channelRemoved
Called when a channel is removed.
channelStateChanged
Called when a new channel state changes.

Operations

void playerConnected(Player state)

Called when a player connects to the server.

Parameters

state
State of connected player.

void playerDisconnected(Player state)

Called when a player disconnects from the server. The player has already been removed, so you can no longer use methods like Server::getState to retrieve the player's state.

Parameters

state
State of disconnected player.

void playerStateChanged(Player state)

Called when a player state changes. This is called if the player moves, is renamed, is muted, deafened etc.

Parameters

state
New state of player.

void channelCreated(Channel state)

Called when a new channel is created.

Parameters

state
State of new channel.

void channelRemoved(Channel state)

Called when a channel is removed. The channel has already been removed, you can no longer use methods like Server::getChannelState

Parameters

state
State of removed channel.

void channelStateChanged(Channel state)

Called when a new channel state changes. This is called if the channel is moved, renamed or if new links are added.

Parameters

state
New state of channel.

Home Previous Up Next Index