MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / handle_write

Method handle_write

src/server/connection.cpp:137–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void Connection::handle_write()
138{
139 auto self = shared_from_this();
140
141 stream_.expires_after(std::chrono::seconds(keepalive_timeout_));
142
143 bhttp::async_write(stream_,
144 response_,
145 [self](boost::beast::error_code ec, std::size_t)
146 {
147 if (!ec)
148 {
149 if (self->should_keep_alive())
150 {
151 self->handle_read();
152 }
153 else
154 {
155 self->handle_close();
156 }
157 }
158 else
159 {
160 util::Log(logDEBUG) << "Connection write error: " << ec.message();
161 }
162 });
163}
164
165void Connection::handle_close()
166{

Callers

nothing calls this directly

Calls 5

should_keep_aliveMethod · 0.95
handle_readMethod · 0.95
handle_closeMethod · 0.95
LogClass · 0.85
messageMethod · 0.80

Tested by

no test coverage detected