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 {
public:
using SocketHandle = TcpTag::SocketHandle;
/**
* \brief Starts listening for guests to connect
* \param port The port to listen to

View File

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