This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
forked from GEEKiDoS/umamusume-localify
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
070669d
commit 4f85da8
Showing
5 changed files
with
176 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,3 +152,6 @@ user*.bat | |
# text_dumper tmp files | ||
resources/text_dumper/obj | ||
resources/text_dumper/bin | ||
|
||
#vcpkg | ||
vcpkg_installed/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <string> | ||
#include <httplib.h> | ||
|
||
namespace notifier | ||
{ | ||
httplib::Client* client = nullptr; | ||
|
||
void init() | ||
{ | ||
client = new httplib::Client("http://127.0.0.1:4693"); | ||
client->set_connection_timeout(0, 100 * 1000); | ||
} | ||
|
||
void notify_response(const std::string& data) | ||
{ | ||
if (client == nullptr) { | ||
init(); | ||
} | ||
|
||
if (auto res = client->Post("/notify/response", data, "application/x-msgpack")) | ||
{ | ||
if (res->status != 200) | ||
{ | ||
std::cout << "Unexpected response from listener: " << res->status << "\n"; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
#include <string> | ||
|
||
namespace notifier | ||
{ | ||
void init(); | ||
|
||
void notify_response(const std::string& data); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", | ||
"name": "exnoa-carrotjuicer", | ||
"version": "1.0.0", | ||
"dependencies": [ | ||
"cpp-httplib", | ||
"minhook", | ||
"nlohmann-json", | ||
"sqlitecpp" | ||
] | ||
} |