diff --git a/src/uvw/tcp.cpp b/src/uvw/tcp.cpp index 1d3073ec..cb3a2147 100644 --- a/src/uvw/tcp.cpp +++ b/src/uvw/tcp.cpp @@ -57,4 +57,25 @@ UVW_INLINE void TCPHandle::closeReset() { } +// 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..5d6e622d 100644 --- a/src/uvw/udp.cpp +++ b/src/uvw/udp.cpp @@ -118,4 +118,64 @@ UVW_INLINE size_t UDPHandle::sendQueueCount() const noexcept { } +// 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(); + + }