102 if (address ==
nullptr)
return false;
105 for (
size_t i = 0; i < threads; ++i) {
107 if (sub_socket == -1) {
116 socketVector.emplace_back(sub_socket);
119 for (
size_t i = 0; i < threads; ++i) {
120 auto event = creator();
121 if (event ==
nullptr) {
124 event->setListenFd(
static_cast<int>(socketVector[i]));
125 if (!event->init()) {
129 eventLoopVector.emplace_back(event);
136 for (
decltype(
auto) event_loop: eventLoopVector) {
139 eventLoopVector.clear();
142 for (
decltype(
auto) sub_socket: socketVector) {
145 socketVector.clear();