|
SVCS - English Documentation
|
Main TCP server for SVCS remote operations. More...
#include <Server.hxx>
Public Member Functions | |
| Server (boost::asio::io_context &io_context, unsigned short port, std::shared_ptr< RepositoryManager > repo_manager, std::shared_ptr< ISubject > event_bus) | |
| Constructs a Server with specified dependencies. | |
| ~Server () | |
| Destructor - stops the server and cleans up resources. | |
| bool | start () |
| Starts the server and begins accepting connections. | |
| void | stop () |
| Stops the server gracefully. | |
| bool | isRunning () const |
| Checks if the server is currently running. | |
| unsigned short | getPort () const |
| Gets the port number the server is listening on. | |
| size_t | getActiveConnections () const |
| Gets the number of currently active client connections. | |
Main TCP server for SVCS remote operations.
Listens on specified port, accepts client connections, and spawns RemoteProtocol instances to handle push/pull operations. Supports multiple concurrent clients through thread pooling.
| svcs::server::Server::Server | ( | boost::asio::io_context & | io_context, |
| unsigned short | port, | ||
| std::shared_ptr< RepositoryManager > | repo_manager, | ||
| std::shared_ptr< ISubject > | event_bus ) |
Constructs a Server with specified dependencies.
| io_context | ASIO I/O context for asynchronous operations. |
| port | TCP port to listen on (default: 9418 - Git protocol port). |
| repo_manager | Shared pointer to repository manager. |
| event_bus | Shared pointer to event bus for notifications. |
| size_t svcs::server::Server::getActiveConnections | ( | ) | const |
Gets the number of currently active client connections.
| unsigned short svcs::server::Server::getPort | ( | ) | const |
Gets the port number the server is listening on.
| bool svcs::server::Server::isRunning | ( | ) | const |
Checks if the server is currently running.
| bool svcs::server::Server::start | ( | ) |
Starts the server and begins accepting connections.
| void svcs::server::Server::stop | ( | ) |
Stops the server gracefully.
Stops accepting new connections and allows existing connections to complete.