diff --git a/src/uvw/tcp.cpp b/src/uvw/tcp.cpp index 1d3073ec..502441d8 100644 --- a/src/uvw/tcp.cpp +++ b/src/uvw/tcp.cpp @@ -56,5 +56,24 @@ UVW_INLINE void TCPHandle::closeReset() { invoke(&uv_tcp_close_reset, get(), &this->closeCallback); } +// explicit instantiation definitions +template void TCPHandle::bind(std::string, unsigned int, Flags); +template void TCPHandle::bind(std::string, unsigned int, Flags); + +template void TCPHandle::bind(Addr, Flags); +template void TCPHandle::bind(Addr, Flags); + +template Addr TCPHandle::sock() const noexcept; +template Addr TCPHandle::sock() const noexcept; + +template Addr TCPHandle::peer() const noexcept; +template Addr TCPHandle::peer() const noexcept; + +template void TCPHandle::connect(std::string, unsigned int); +template void TCPHandle::connect(std::string, unsigned int); + +template void TCPHandle::connect(Addr addr); +template void TCPHandle::connect(Addr addr); + } diff --git a/src/uvw/udp.cpp b/src/uvw/udp.cpp index 12b13269..5d3ea428 100644 --- a/src/uvw/udp.cpp +++ b/src/uvw/udp.cpp @@ -117,5 +117,63 @@ UVW_INLINE size_t UDPHandle::sendQueueCount() const noexcept { return uv_udp_get_send_queue_count(get()); } +// explicit instantiation definitions +template void UDPHandle::connect(std::string, unsigned int); +template void UDPHandle::connect(std::string, unsigned int); + +template void UDPHandle::connect(Addr); +template void UDPHandle::connect(Addr); + +template Addr UDPHandle::peer() const noexcept; +template Addr UDPHandle::peer() const noexcept; + +template void UDPHandle::bind(std::string, unsigned int, Flags); +template void UDPHandle::bind(std::string, unsigned int, Flags); + +template void UDPHandle::bind(Addr, Flags); +template void UDPHandle::bind(Addr, Flags); + +template Addr UDPHandle::sock() const noexcept; +template Addr UDPHandle::sock() const noexcept; + +template bool UDPHandle::multicastMembership(std::string, std::string, Membership); +template bool UDPHandle::multicastMembership(std::string, std::string, Membership); + +template bool UDPHandle::multicastInterface(std::string); +template bool UDPHandle::multicastInterface(std::string); + +template void UDPHandle::send(std::string, unsigned int, std::unique_ptr, unsigned int); +template void UDPHandle::send(std::string, unsigned int, std::unique_ptr, unsigned int); + +template void UDPHandle::send(Addr, std::unique_ptr, unsigned int); +template void UDPHandle::send(Addr, std::unique_ptr, unsigned int); + +template void UDPHandle::send(std::string, unsigned int, char *, unsigned int); +template void UDPHandle::send(std::string, unsigned int, char *, unsigned int); + +template void UDPHandle::send(Addr, char *, unsigned int); +template void UDPHandle::send(Addr, char *, unsigned int); + +template int UDPHandle::trySend(const sockaddr &, std::unique_ptr, unsigned int); +template int UDPHandle::trySend(const sockaddr &, std::unique_ptr, unsigned int); + +template int UDPHandle::trySend(std::string, unsigned int, std::unique_ptr, unsigned int); +template int UDPHandle::trySend(std::string, unsigned int, std::unique_ptr, unsigned int); + +template int UDPHandle::trySend(Addr, std::unique_ptr, unsigned int); +template int UDPHandle::trySend(Addr, std::unique_ptr, unsigned int); + +template int UDPHandle::trySend(const sockaddr &, char *, unsigned int); +template int UDPHandle::trySend(const sockaddr &, char *, unsigned int); + +template int UDPHandle::trySend(std::string, unsigned int, char *, unsigned int); +template int UDPHandle::trySend(std::string, unsigned int, char *, unsigned int); + +template int UDPHandle::trySend(Addr, char *, unsigned int); +template int UDPHandle::trySend(Addr, char *, unsigned int); + +template void UDPHandle::recv(); +template void UDPHandle::recv(); + }