diff --git a/src/uvw/tcp.hpp b/src/uvw/tcp.hpp index 006f1f73..147723fb 100644 --- a/src/uvw/tcp.hpp +++ b/src/uvw/tcp.hpp @@ -38,6 +38,11 @@ public: bool init() { return initialize(&uv_tcp_init); } + template + bool init(T&& t, Args&&... args) { + return initialize(&uv_tcp_init_ex, std::forward(t), std::forward(args)...); + } + void noDelay(bool value = false) { invoke(&uv_tcp_nodelay, get(), value); } @@ -46,6 +51,10 @@ public: invoke(&uv_tcp_keepalive, get(), enable, time.count()); } + void simultaneousAccepts(bool enable = true) { + invoke(&uv_tcp_simultaneous_accepts, get(), enable); + } + template void bind(std::string ip, unsigned int port, Flags flags = Flags{}) { typename details::IpTraits::Type addr;