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:
parent
5890a98b65
commit
b84e3e9735
257 changed files with 6665 additions and 2608 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue