Add support for periodic ping
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@
|
|||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
namespace nvhttp {
|
namespace nvhttp {
|
||||||
|
|
||||||
constexpr auto VERSION = "7.1.404.0";
|
constexpr auto VERSION = "7.1.415.0";
|
||||||
constexpr auto GFE_VERSION = "3.12.0.1";
|
constexpr auto GFE_VERSION = "3.12.0.1";
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|||||||
+5
-1
@@ -11,8 +11,8 @@
|
|||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <moonlight-common-c/src/Video.h>
|
|
||||||
#include <moonlight-common-c/src/RtpAudioQueue.h>
|
#include <moonlight-common-c/src/RtpAudioQueue.h>
|
||||||
|
#include <moonlight-common-c/src/Video.h>
|
||||||
#include <rs.h>
|
#include <rs.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,6 +33,7 @@ extern "C" {
|
|||||||
#define IDX_INPUT_DATA 5
|
#define IDX_INPUT_DATA 5
|
||||||
#define IDX_RUMBLE_DATA 6
|
#define IDX_RUMBLE_DATA 6
|
||||||
#define IDX_TERMINATION 7
|
#define IDX_TERMINATION 7
|
||||||
|
#define IDX_PERIODIC_PING 8
|
||||||
|
|
||||||
static const short packetTypes[] = {
|
static const short packetTypes[] = {
|
||||||
0x0305, // Start A
|
0x0305, // Start A
|
||||||
@@ -43,6 +44,7 @@ static const short packetTypes[] = {
|
|||||||
0x0206, // Input data
|
0x0206, // Input data
|
||||||
0x010b, // Rumble data
|
0x010b, // Rumble data
|
||||||
0x0100, // Termination
|
0x0100, // Termination
|
||||||
|
0x0200, // Periodic Ping
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace asio = boost::asio;
|
namespace asio = boost::asio;
|
||||||
@@ -418,6 +420,8 @@ std::vector<uint8_t> replace(const std::string_view &original, const std::string
|
|||||||
}
|
}
|
||||||
|
|
||||||
void controlBroadcastThread(control_server_t *server) {
|
void controlBroadcastThread(control_server_t *server) {
|
||||||
|
server->map(packetTypes[IDX_PERIODIC_PING], [](session_t *session, const std::string_view &payload) {});
|
||||||
|
|
||||||
server->map(packetTypes[IDX_START_A], [&](session_t *session, const std::string_view &payload) {
|
server->map(packetTypes[IDX_START_A], [&](session_t *session, const std::string_view &payload) {
|
||||||
BOOST_LOG(debug) << "type [IDX_START_A]"sv;
|
BOOST_LOG(debug) << "type [IDX_START_A]"sv;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user