| 96 | |
| 97 | namespace dflash::common { |
| 98 | |
| 99 | namespace { |
| 100 | constexpr auto kClientMonitorInterval = std::chrono::milliseconds(250); |
| 101 | constexpr auto kSseHeartbeatInterval = std::chrono::seconds(15); |
| 102 | constexpr auto kReadClosedProbeInterval = std::chrono::seconds(1); |
| 103 | constexpr char kSseHeartbeat[] = ": keep-alive\n\n"; |
| 104 | } |
| 105 | |
| 106 | namespace http_detail { |
| 107 | |
| 108 | PeerSocketState inspect_peer_socket(SocketHandle fd) { |
| 109 | struct pollfd pfd = {fd, POLLIN, 0}; |
| 110 | #if defined(POLLRDHUP) |
| 111 | pfd.events |= POLLRDHUP; |
| 112 | #endif |