MCPcopy Create free account
hub / github.com/chen3feng/toft / HttpConnection

Method HttpConnection

net/http/server/connection.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace toft {
14
15HttpConnection::HttpConnection(EventDispatcher* dispatcher, int fd)
16 : m_watcher(dispatcher, std::bind(&HttpConnection::OnIoEvents, this,
17 std::placeholders::_1),
18 fd, EventMask_Read),
19 m_sent_size(0) {
20 m_socket.Attach(fd);
21 m_watcher.Start();
22}
23
24void HttpConnection::Send(const StringPiece& data) {
25 m_send_queue.push_back(data.as_string());

Callers

nothing calls this directly

Calls 2

AttachMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected