X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/ebd5aef6dc92accb509b1cc67eaf72159f35cdfa..c06ef44e7af1571710fd31dd0ab068dd77b1eb2d:/rpc/connection.h diff --git a/rpc/connection.h b/rpc/connection.h index 1bcb7b6..03e92da 100644 --- a/rpc/connection.h +++ b/rpc/connection.h @@ -4,10 +4,10 @@ #include "types.h" #include #include +#include "t4.h" #include "poll_mgr.h" #include "file.h" - -constexpr size_t size_t_max = numeric_limits::max(); +#include "threaded_log.h" class connection; @@ -17,7 +17,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 +31,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 +44,20 @@ class connection : private aio_callback, public enable_shared_from_this> conns_; + std::map> conns_; }; #endif