Refactor connection create process

This commit is contained in:
dijunkun
2023-08-17 10:20:47 +08:00
parent c46396a18a
commit a9db3d290b
14 changed files with 426 additions and 373 deletions

View File

@@ -0,0 +1,23 @@
#include <iostream>
#include "x.h"
int main(int argc, char** argv) {
Params params;
params.cfg_path = "../../../../config/config.ini";
PeerPtr* peer = CreatePeer(&params);
CreateConnection(peer);
std::string msg = "Answer peer";
int i = 100;
while (i--) {
getchar();
std::cout << "Send data: [" << msg << "]" << std::endl;
SendData(peer, msg.data(), msg.size());
}
getchar();
return 0;
}