Skip to content
Snippets Groups Projects
Commit ab2f71e2 authored by Daniel Müller's avatar Daniel Müller :speech_balloon:
Browse files

Fix sockcopy compile issue

parent de768167
Branches
No related tags found
No related merge requests found
Pipeline #72550 failed
...@@ -95,42 +95,18 @@ public: ...@@ -95,42 +95,18 @@ public:
}; };
SockCopy<TcpStream> wrapCopy(TcpStream & other, bool disableAutoclose = true) SockCopy<TcpStream> wrapCopy(TcpStream & other, bool disableAutoclose = true);
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpStream>(other);
}
SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose = true) SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose = true);
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpListener>(other);
}
SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose = true) SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose = true);
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<UdpSocket>(other);
}
SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose = true) SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose = true);
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpStream>(std::move(other));
}
SockCopy<TcpListener> wrapCopy(TcpListener && other, bool disableAutoclose = true) SockCopy<TcpListener> wrapCopy(TcpListener && other, bool disableAutoclose = true);
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpListener>(std::move(other));
}
SockCopy<UdpSocket> wrapCopy(UdpSocket && other, bool disableAutoclose = true) SockCopy<UdpSocket> wrapCopy(UdpSocket && other, bool disableAutoclose = true);
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<UdpSocket>(std::move(other));
}
} // namespace netlib } // namespace netlib
......
#include "sockcopy.hpp"
namespace netlib
{
SockCopy<TcpStream> wrapCopy(TcpStream & other, bool disableAutoclose = true)
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpStream>(other);
}
SockCopy<TcpListener> wrapCopy(TcpListener & other, bool disableAutoclose = true)
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpListener>(other);
}
SockCopy<UdpSocket> wrapCopy(UdpSocket & other, bool disableAutoclose = true)
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<UdpSocket>(other);
}
SockCopy<TcpStream> wrapCopy(TcpStream && other, bool disableAutoclose = true)
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpStream>(std::move(other));
}
SockCopy<TcpListener> wrapCopy(TcpListener && other, bool disableAutoclose = true)
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<TcpListener>(std::move(other));
}
SockCopy<UdpSocket> wrapCopy(UdpSocket && other, bool disableAutoclose = true)
{
if (disableAutoclose) other.setAutoclose(false);
return SockCopy<UdpSocket>(std::move(other));
}
} // namespace netlib
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment