MCPcopy Create free account
hub / github.com/acl-dev/acl / del_read_callback

Method del_read_callback

lib_acl_cpp/src/stream/aio_istream.cpp:114–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114int aio_istream::del_read_callback(aio_callback* callback /* = NULL */)
115{
116 std::list<AIO_CALLBACK*>::iterator it = read_callbacks_.begin();
117 int n = 0;
118
119 if (callback == NULL) {
120 for (; it != read_callbacks_.end(); ++it) {
121 if ((*it)->callback == NULL) {
122 continue;
123 }
124 (*it)->enable = false;
125 (*it)->callback = NULL;
126 n++;
127 }
128 } else {
129 for (; it != read_callbacks_.end(); ++it) {
130 if ((*it)->callback != callback) {
131 continue;
132 }
133 (*it)->enable = false;
134 (*it)->callback = NULL;
135 n++;
136 break;
137 }
138 }
139
140 return n;
141}
142
143int aio_istream::disable_read_callback(aio_callback* callback)
144{

Callers 2

handle_ssl_handshakeMethod · 0.80
handle_ssl_handshakeMethod · 0.80

Calls 2

beginMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected