1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

pow-testgiver support

This commit is contained in:
ton 2020-07-06 17:07:20 +03:00
parent dbde9c1c40
commit f064b1047a
257 changed files with 6665 additions and 2608 deletions

View file

@ -27,7 +27,7 @@
*/
#include "td/actor/actor.h"
#include "td/utils/OptionsParser.h"
#include "td/utils/OptionParser.h"
#include "td/utils/Observer.h"
#include "td/utils/port/UdpSocketFd.h"
@ -113,21 +113,15 @@ class PingPong : public td::actor::Actor {
};
int main(int argc, char *argv[]) {
td::OptionsParser options_parser;
td::OptionParser options_parser;
options_parser.set_description("Udp ping server/client (8083 <-> 8084) (based on td::actors2)");
int from_port = 8083;
int to_port = 8084;
bool is_client = false;
bool use_tcp = false;
options_parser.add_option('c', "client", "Work as client (server by default)", [&]() {
is_client = true;
return td::Status::OK();
});
options_parser.add_option('t', "tcp", "Use tcp (udp by default)", [&]() {
use_tcp = true;
return td::Status::OK();
});
options_parser.add_option('c', "client", "Work as client (server by default)", [&]() { is_client = true; });
options_parser.add_option('t', "tcp", "Use tcp (udp by default)", [&]() { use_tcp = true; });
auto status = options_parser.run(argc, argv);
if (status.is_error()) {
LOG(ERROR) << status.error();