class Murcure::Server::State

Overview

This class is used to store state of server. Instance provide methods to acces users, rooms and information from config.

Defined in:

murcure/server/state.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Server::Config) #

[View source]

Instance Method Detail

def add_client(client : Client::Entity) : Void #

[View source]
def add_to_room(client : Client::Entity, room_id : UInt32) #

[View source]
def channels_state : Array(Murcure::Protos::ChannelState) #

[View source]
def default_channel_id #

[View source]
def max_bandwidth #

[View source]
def max_users #

[View source]
def remove_client(client : Client::Entity) : Void #

[View source]
def remove_from_room(client : Client::Entity, room_id : Nil) #

[View source]
def remove_from_room(client : Client::Entity, room_id : UInt32) #

[View source]
def select_rooms(ids : Array(UInt32)) : Array(Room::Entity) #

[View source]
def user_count #

[View source]
def users(&) #

[View source]
def users_state : Array(Murcure::Protos::UserState) #

[View source]
def welcome_text #

[View source]