Files
voice-cat/server/src/server.h

41 lines
1.1 KiB
C
Raw Normal View History

/*
* server.h voicecat-server skeleton.
*
* Design: docs/architecture.md §5, docs/deployment.md. Headless process that links the core.
* Responsibilities: connection manager (TLS), session registry, channel manager, text router,
* voice SFU relay, SQLite persistence. Zero-config: self-provisions Ed25519 identity + cert
* on first run, embedded SQLite, guests on by default.
*
* STATUS: M0 stub prints config and exits; does not yet listen.
*/
#ifndef VOICECAT_SERVER_SERVER_H
#define VOICECAT_SERVER_SERVER_H
#include <cstdint>
#include <string>
namespace voicecat::server {
struct Config {
std::string server_name = "VoiceCat Server";
std::string data_dir = "voicecat-data";
uint16_t bind_port = 8384; // TCP + UDP (docs/deployment.md §2)
bool allow_guests = true;
};
class Server {
public:
explicit Server(Config cfg) : cfg_(std::move(cfg)) {}
// TODO(M1): bind TLS control listener + UDP media socket; run the Asio loop until stop.
// Returns process exit code.
int run();
private:
Config cfg_;
};
} // namespace voicecat::server
#endif // VOICECAT_SERVER_SERVER_H