QcHeadlessJoin Class
qtcraft-headless –join (decision E-270): the control-interface bot joins a server over TCP instead of hosting a world in-process. More...
| Header: | #include <headless/QcHeadlessJoin.h> |
| Inherits: | QObject |
Public Types
| struct | Options |
Public Functions
| QcStatus | start(const QcHeadlessJoin::Options &options, const QcModLoader::Result &content) |
| std::unique_ptr<QcClientSession> | takeSession() |
Signals
Static Public Members
| const int | exitConnectionLost |
| const int | exitJoinFailed |
Detailed Description
Logs in with the installation key of the data directory, the password and the content this process loaded, then hands over the session; every join ends with exactly one of joined() and failed().
Member Function Documentation
[signal] void QcHeadlessJoin::failed(const QString &reason)
The connection could not be made or broke, or the server refused the login; reason says which.
[signal] void QcHeadlessJoin::joined()
The session is logged in and loads the world; the receiver takes it over with takeSession().
QcStatus QcHeadlessJoin::start(const QcHeadlessJoin::Options &options, const QcModLoader::Result &content)
Starts connecting as options describe, offering the packs of content to the server; returns an error (bad address, damaged key) when it cannot even start.
std::unique_ptr<QcClientSession> QcHeadlessJoin::takeSession()
Returns the session after joined(); null before and once taken.