MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / inplace_modify_fd

Method inplace_modify_fd

src/dpp/socketengine.cpp:95–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void socket_engine_base::inplace_modify_fd(dpp::socket fd, uint8_t extra_flags) {
96 bool should_modify;
97 socket_events s{};
98 {
99 std::lock_guard lk(fds_mutex);
100 auto i = fds.find(fd);
101 should_modify = i != fds.end() && (i->second->flags & extra_flags) != extra_flags;
102 if (should_modify) {
103 i->second->flags |= extra_flags;
104 s = *(i->second);
105 }
106 }
107 if (should_modify) {
108 update_socket(s);
109 }
110}
111
112void socket_engine_base::prune() {
113 if (time(nullptr) != last_time) {

Callers 1

socket_writeMethod · 0.80

Calls 3

update_socketFunction · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected