summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_socket.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-12 15:23:44 +0100
committerCarl Hetherington <cth@carlh.net>2026-03-21 00:10:38 +0100
commit11367042fed34aefb04fda1c8dc9c5ce424fb52e (patch)
treed307cdb764a322e1bb85e40fcd46786820a8d258 /src/lib/dcpomatic_socket.cc
parent4cd4cd64366659381aca1a1a7ac8078c8cd6cb50 (diff)
Replace deprecated boost::asio::deadline_timer with boost::asio::system_timer.
Diffstat (limited to 'src/lib/dcpomatic_socket.cc')
-rw-r--r--src/lib/dcpomatic_socket.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/dcpomatic_socket.cc b/src/lib/dcpomatic_socket.cc
index 33182e4a9..b795811e4 100644
--- a/src/lib/dcpomatic_socket.cc
+++ b/src/lib/dcpomatic_socket.cc
@@ -43,16 +43,16 @@ Socket::Socket (int timeout)
, _socket(_io_context)
, _timeout (timeout)
{
- _deadline.expires_at (boost::posix_time::pos_infin);
- check ();
+ _deadline.expires_at(std::chrono::time_point<std::chrono::system_clock>::max());
+ check();
}
void
Socket::check ()
{
- if (_deadline.expires_at() <= boost::asio::deadline_timer::traits_type::now ()) {
- _socket.close ();
- _deadline.expires_at (boost::posix_time::pos_infin);
+ if (_deadline.expires_at() <= std::chrono::system_clock::now()) {
+ _socket.close();
+ _deadline.expires_at(std::chrono::time_point<std::chrono::system_clock>::max());
}
_deadline.async_wait (boost::bind (&Socket::check, this));
@@ -321,7 +321,7 @@ Socket::set_send_buffer_size (int size)
void
Socket::set_deadline_from_now(int seconds)
{
- _deadline.expires_from_now(boost::posix_time::seconds(seconds));
+ _deadline.expires_from_now(std::chrono::seconds(seconds));
}
void