MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / handle_input

Method handle_input

tools/rtpsrelay/RelayHttpMetaDiscovery.cpp:34–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34int HttpConnection::handle_input(ACE_HANDLE)
35{
36 OpenDDS::DCPS::ThreadStatusManager::Event ev(TheServiceParticipant->get_thread_status_manager());
37
38 const auto bytes = peer().recv(buffer_.wr_ptr(), buffer_.space(),
39 &ACE_Time_Value::zero);
40
41 if (bytes == 0) {
42 peer().close_reader();
43 return HANDLER_REMOVE;
44 }
45
46 if (bytes < 0 && errno == ETIME) {
47 return HANDLER_OK;
48 }
49
50 if (bytes <= 0) {
51 return HANDLER_ERROR;
52 }
53
54 buffer_.wr_ptr(static_cast<size_t>(bytes));
55 const std::string request(buffer_.rd_ptr(), buffer_.length());
56 if (relay_http_meta_discovery_->processRequest(peer(), request)) {
57 peer().close_writer();
58 buffer_.reset();
59 }
60
61 return HANDLER_OK;
62}
63
64bool RelayHttpMetaDiscovery::processRequest(ACE_SOCK_Stream& peer,
65 const std::string& request) const

Callers

nothing calls this directly

Calls 5

processRequestMethod · 0.80
recvMethod · 0.45
spaceMethod · 0.45
lengthMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected