MCPcopy Create free account
hub / github.com/apache/trafficserver / populate

Method populate

src/iocore/net/UnixNetVConnection.cc:1123–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1121}
1122
1123int
1124UnixNetVConnection::populate(Connection &con_in, Continuation *c, void * /* arg ATS_UNUSED */)
1125{
1126 this->con.move(con_in);
1127 this->mutex = c->mutex;
1128 this->thread = this_ethread();
1129
1130 EThread *t = this_ethread();
1131 NetHandler *h = get_NetHandler(t);
1132
1133 MUTEX_TRY_LOCK(lock, h->mutex, t);
1134 if (!lock.is_locked()) {
1135 // Clean up and go home
1136 return EVENT_ERROR;
1137 }
1138
1139 if (h->startIO(this) < 0) {
1140 Dbg(dbg_ctl_iocore_net, "populate : Failed to add to epoll list");
1141 return EVENT_ERROR;
1142 }
1143
1144 ink_assert(this->nh != nullptr);
1145 SET_HANDLER(&UnixNetVConnection::mainEvent);
1146 this->nh->startCop(this);
1147 ink_assert(this->con.sock.is_ok());
1148 return EVENT_DONE;
1149}
1150
1151int
1152UnixNetVConnection::connectUp(EThread *t, int fd)

Callers 1

Calls 6

this_ethreadFunction · 0.85
get_NetHandlerFunction · 0.85
moveMethod · 0.80
startIOMethod · 0.80
startCopMethod · 0.80
is_okMethod · 0.45

Tested by

no test coverage detected