Struct apollo_framework::server::Server [−][src]
Expand description
Represents a TODO server which manages all TCP connections.
Implementations
Creates and installs a Server into the given Platform.
Note that this is called by the Builder unless disabled.
Also note, that this will not technically start the server. This has to be done manually via event_loop as it is most probable done in the main thread.
pub fn connections(&self) -> Vec<ConnectionInfo<P>>ⓘ
pub fn connections(&self) -> Vec<ConnectionInfo<P>>ⓘ
Lists all currently active connections.
Starts the event loop in a separate thread.
This is most probably used by test scenarios where the tests itself run in the main thread.
Starts the event loop in a separate thread and waits until the server is up and running.
Just like fork this is intended to be used in test environments.
Tries to open a server socket on the specified address to serve incoming client connections.
The task of this loop is to bind the server socket to the specified address. Once this was successful, we enter the server_loop to actually handle incoming connections. Once this loop returns, either the platform is no longer running and we should exit, or the config has changed and we should try to bind the server to the new address.