X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/26ade07ab0e62b98b452fbbd18edba0450035e35..03b35a9a1bd1f583e32b27d260b223a0989d6c75:/rpc/connection.h?ds=sidebyside diff --git a/rpc/connection.h b/rpc/connection.h index 1bcb7b6..68bd902 100644 --- a/rpc/connection.h +++ b/rpc/connection.h @@ -7,8 +7,6 @@ #include "poll_mgr.h" #include "file.h" -constexpr size_t size_t_max = numeric_limits::max(); - class connection; class connection_delegate { @@ -17,7 +15,10 @@ class connection_delegate { virtual ~connection_delegate(); }; -class connection : private aio_callback, public enable_shared_from_this { +using std::chrono::steady_clock; +using time_point = std::chrono::time_point; + +class connection : private aio_callback, public std::enable_shared_from_this { public: connection(connection_delegate * delegate, socket_t && f1, int lossytest=0); ~connection(); @@ -28,7 +29,7 @@ class connection : private aio_callback, public enable_shared_from_this to_dst(const sockaddr_in & dst, connection_delegate *mgr, int lossy=0); - const time_point create_time = steady_clock::now(); + const time_point create_time = steady_clock::now(); const file_t fd; private: @@ -41,18 +42,20 @@ class connection : private aio_callback, public enable_shared_from_this> conns_; + std::map> conns_; }; #endif