void crofchantest::handle_established(rofl::crofchan &chan, rofl::crofconn &conn, uint8_t ofp_version) { rofl::AcquireReadWriteLock lock(tlock); LOG(INFO) << std::endl; LOG(INFO) << "TEST: crofchantest::handle_established() -chan-, " << "num_of_accepts = " << num_of_accepts << ", " << "num_of_conns = " << num_of_conns << ", " << "channel1.size() = " << channel1->size() << ", " << "channel2.size() = " << channel2->size() << ", " << "conn.get_auxid() = " << (int)conn.get_auxid().get_id() << std::endl; CPPUNIT_ASSERT(conn.is_established()); if (testname == std::string("test_congestion")) { /* we need a large queue size to force a loopback socket into congestion */ if (channel1 == &chan) { conn.set_txqueue_max_size(65536); } if (conn.get_auxid() == rofl::cauxid(0)) { rofl::cthread::thread(thread_num) .add_timer(this, TIMER_ID_START_SENDING_PACKET_INS, rofl::ctimespec().expire_in(1)); } } }
void crofchantest::handle_established(rofl::crofconn &conn, uint8_t ofp_version) { { rofl::AcquireReadWriteLock lock(plock); pending_conns.erase(&conn); LOG(INFO) << "crofchantest::handle_established() pending_conns: " << pending_conns.size() << std::endl; } rofl::AcquireReadWriteLock lock(tlock); channel2->add_conn(&conn); LOG(INFO) << "TEST: crofchantest::handle_established() server via -conn-, " << "conn.get_auxid() = " << (int)conn.get_auxid().get_id() << std::endl; CPPUNIT_ASSERT(conn.is_established()); num_of_ctl_established++; LOG(INFO) << "num_of_ctl_established = " << num_of_ctl_established << std::endl; }