mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 15:36:10 +00:00
post HTTP::Get
This commit is contained in:
parent
eb78630547
commit
9de3658ed3
@ -267,6 +267,7 @@ void ClientNetwork::handle_quick_join(bmp::ClientPacket& packet) {
|
|||||||
void ClientNetwork::handle_browsing(bmp::ClientPacket& packet) {
|
void ClientNetwork::handle_browsing(bmp::ClientPacket& packet) {
|
||||||
switch (packet.purpose) {
|
switch (packet.purpose) {
|
||||||
case bmp::ClientPurpose::ServerListRequest: {
|
case bmp::ClientPurpose::ServerListRequest: {
|
||||||
|
post(m_io, [&, this] {
|
||||||
auto list = load_server_list();
|
auto list = load_server_list();
|
||||||
if (list.has_value()) {
|
if (list.has_value()) {
|
||||||
client_tcp_write(bmp::ClientPacket {
|
client_tcp_write(bmp::ClientPacket {
|
||||||
@ -280,6 +281,7 @@ void ClientNetwork::handle_browsing(bmp::ClientPacket& packet) {
|
|||||||
.raw_data = json_to_vec({ "message", list.error() }),
|
.raw_data = json_to_vec({ "message", list.error() }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
} break;
|
} break;
|
||||||
case bmp::ClientPurpose::Logout: {
|
case bmp::ClientPurpose::Logout: {
|
||||||
spdlog::error("Logout is not yet implemented");
|
spdlog::error("Logout is not yet implemented");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user