move SocketHandle to TcpTag
All checks were successful
Linux arm64 / Build (push) Successful in 1m3s

This commit is contained in:
2025-03-12 19:07:29 +01:00
parent 77356ce749
commit 205c09a338
2 changed files with 7 additions and 3 deletions

View File

@@ -10,6 +10,8 @@ namespace io {
*/ */
class TcpListener : private NonCopyable { class TcpListener : private NonCopyable {
public: public:
using SocketHandle = TcpTag::SocketHandle;
/** /**
* \brief Starts listening for guests to connect * \brief Starts listening for guests to connect
* \param port The port to listen to * \param port The port to listen to

View File

@@ -6,9 +6,9 @@
namespace sp { namespace sp {
namespace io { namespace io {
using SocketHandle = int; struct TcpTag {
using SocketHandle = int;
struct TcpTag {}; };
class SocketError : public std::exception { class SocketError : public std::exception {
private: private:
@@ -25,6 +25,8 @@ class SocketError : public std::exception {
template <> template <>
class IOInterface<TcpTag> : private NonCopyable { class IOInterface<TcpTag> : private NonCopyable {
public: public:
using SocketHandle = TcpTag::SocketHandle;
/** /**
* \enum Status * \enum Status
* \brief Describes the state of a socket * \brief Describes the state of a socket