mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-09-30 12:42:26 +07:00
Move ws::WebSocket's chrono set_read_timeout into the header half
Defined next to its non-template overload, it landed in the part of the header that test_split compiles into httplib.cc, leaving a user TU's instantiation with nothing to link against. The WebSocketClient overload of the same name has always sat up with the class definitions; this one belongs there too. Only test_split sees it -- a header-only build instantiates the template wherever it is written, which is why the regular test target stayed green.
This commit is contained in:
@@ -4602,6 +4602,13 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class Rep, class Period>
|
||||
inline void
|
||||
WebSocket::set_read_timeout(const std::chrono::duration<Rep, Period> &duration) {
|
||||
detail::duration_to_sec_and_usec(
|
||||
duration, [&](time_t sec, time_t usec) { set_read_timeout(sec, usec); });
|
||||
}
|
||||
|
||||
template <class Rep, class Period>
|
||||
inline void WebSocketClient::set_read_timeout(
|
||||
const std::chrono::duration<Rep, Period> &duration) {
|
||||
@@ -22457,13 +22464,6 @@ inline void WebSocket::set_read_timeout(time_t sec, time_t usec) {
|
||||
strm_.set_read_timeout(sec, usec);
|
||||
}
|
||||
|
||||
template <class Rep, class Period>
|
||||
inline void WebSocket::set_read_timeout(
|
||||
const std::chrono::duration<Rep, Period> &duration) {
|
||||
detail::duration_to_sec_and_usec(
|
||||
duration, [&](time_t sec, time_t usec) { set_read_timeout(sec, usec); });
|
||||
}
|
||||
|
||||
// WebSocketClient implementation
|
||||
inline WebSocketClient::WebSocketClient(
|
||||
const std::string &scheme_host_port_path, const Headers &headers)
|
||||
|
||||
Reference in New Issue
Block a user