aboutsummaryrefslogtreecommitdiff
path: root/test/bench_network_tls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/bench_network_tls.cpp')
-rw-r--r--test/bench_network_tls.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/bench_network_tls.cpp b/test/bench_network_tls.cpp
index 89e39a8..2827a99 100644
--- a/test/bench_network_tls.cpp
+++ b/test/bench_network_tls.cpp
@@ -71,7 +71,6 @@ using MsgNetworkByteOp = MsgNetwork<opcode_t>;
struct MyNet: public MsgNetworkByteOp {
const std::string name;
- const NetAddr peer;
TimerEvent ev_period_stat;
ThreadCall tcall;
size_t nrecv;
@@ -79,7 +78,6 @@ struct MyNet: public MsgNetworkByteOp {
MyNet(const salticidae::EventContext &ec,
const std::string name,
- const NetAddr &peer,
double stat_timeout = -1):
MsgNetworkByteOp(ec, MsgNetworkByteOp::Config(
ConnPool::Config()
@@ -88,7 +86,6 @@ struct MyNet: public MsgNetworkByteOp {
.tls_cert_file("alice.pem")
.tls_key_file("alice.pem")).burst_size(1000)),
name(name),
- peer(peer),
ev_period_stat(ec, [this, stat_timeout](TimerEvent &) {
SALTICIDAE_LOG_INFO("%.2f mps", nrecv / (double)stat_timeout);
fflush(stderr);
@@ -138,13 +135,13 @@ NetAddr alice_addr("127.0.0.1:1234");
NetAddr bob_addr("127.0.0.1:1235");
int main() {
- salticidae::BoxObj<MyNet> alice = new MyNet(ec, "Alice", bob_addr, 10);
+ salticidae::BoxObj<MyNet> alice = new MyNet(ec, "Alice", 10);
alice->start();
alice->listen(alice_addr);
salticidae::EventContext tec;
salticidae::BoxObj<ThreadCall> tcall = new ThreadCall(tec);
std::thread bob_thread([&tec]() {
- MyNet bob(tec, "Bob", alice_addr);
+ MyNet bob(tec, "Bob");
bob.start();
bob.connect(alice_addr);
try {