mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
rpcn: add cookie impl to tickets
This commit is contained in:
parent
fd0e7a4efa
commit
6c5b8dc31c
3 changed files with 14 additions and 5 deletions
|
|
@ -49,7 +49,7 @@ std::vector<std::vector<u8>> get_rpcn_msgs();
|
|||
|
||||
namespace rpcn
|
||||
{
|
||||
constexpr u32 RPCN_PROTOCOL_VERSION = 14;
|
||||
constexpr u32 RPCN_PROTOCOL_VERSION = 15;
|
||||
constexpr usz RPCN_HEADER_SIZE = 13;
|
||||
constexpr usz COMMUNICATION_ID_SIZE = 9;
|
||||
|
||||
|
|
@ -1590,11 +1590,14 @@ namespace rpcn
|
|||
return true;
|
||||
}
|
||||
|
||||
bool rpcn_client::req_ticket(u32 req_id, const std::string& service_id)
|
||||
bool rpcn_client::req_ticket(u32 req_id, const std::string& service_id, const std::vector<u8>& cookie)
|
||||
{
|
||||
std::vector<u8> data;
|
||||
std::copy(service_id.begin(), service_id.end(), std::back_inserter(data));
|
||||
data.push_back(0);
|
||||
const le_t<u32> size = cookie.size();
|
||||
std::copy(reinterpret_cast<const u8 *>(&size), reinterpret_cast<const u8 *>(&size) + sizeof(le_t<u32>), std::back_inserter(data));
|
||||
std::copy(cookie.begin(), cookie.end(), std::back_inserter(data));
|
||||
|
||||
if (!forge_send(CommandType::RequestTicket, req_id, data))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue