class BBS::Config
The global settings of the BBS, kept in BBS.config and set with BBS.configure. A new Config holds the defaults below.
Constants
- DEFAULT_USER_AGENT
-
The User-Agent of
BBS::HTTPwhen none is configured.
Attributes
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
screens_dir-
directory of the ERB screens
BBS::RendererandFlow#screenread when the flow has noscreens_dirof its own; defaultnil - flow
-
the
BBS::Flowevery newBBS::Sessionruns; must be set beforeBBS.start on_session_end-
callable invoked as
call(session)from the server thread after each session ends, even on an error; defaultnil - port
-
TCP port
BBS.startlistens on; default theBBS_PORTenvironment variable or 2323 - theme
-
the
BBS::Themeof everyApplicationthat does not set one with its ownthemecall;nil(the default) meansBBS::Theme.synchronet - mouse
-
whether the board uses mouse reporting at all; default
false mouse_on_connect-
whether a session turns mouse reporting on as soon as it connects (when
mouseis on); defaulttrue idle_seconds-
idle limit in seconds of the
Applicationloop and each connection’s socket read/write timeout; each session starts with it and may change its own (Session#idle_seconds=);nil(the default) means noApplicationlimit and a 900-second socket timeout max_sessions-
the most callers served at once; more are turned away. Default the
BBS_MAX_SESSIONSenvironment variable or 100 max_sessions_per_ip-
the most callers served at once from one public
address; local ones (a proxy on the Docker network, see BBS::Address.local?) are not limited. Default the +BBS_MAX_SESSIONS_PER_IP+ environment variable or 6
ai_concurrency-
the most
BBS::AI::Clientrequests running at once in the process; default 2 user_agent-
the User-Agent header of
BBS::HTTPrequests; defaultrubbs/<version> (+https://teletypegames.org) log_tag-
what every
BBS.logline starts with, the board’s technical name such asfeedia-bbs; default theBBS_LOG_TAGenvironment variable orbbs
Public Class Methods
Source
# File lib/bbs/config.rb, line 55 def initialize @port = (ENV['BBS_PORT'] || 2323).to_i @mouse = false @mouse_on_connect = true @idle_seconds = nil @max_sessions = (ENV['BBS_MAX_SESSIONS'] || 100).to_i @max_sessions_per_ip = (ENV['BBS_MAX_SESSIONS_PER_IP'] || 6).to_i @ai_concurrency = 2 @user_agent = DEFAULT_USER_AGENT @log_tag = ENV['BBS_LOG_TAG'] || 'bbs' end
Creates a Config with the defaults, reading BBS_PORT, BBS_MAX_SESSIONS, BBS_MAX_SESSIONS_PER_IP and BBS_LOG_TAG from the environment.