move SocketHandle to TcpTag
All checks were successful
Linux arm64 / Build (push) Successful in 1m3s
All checks were successful
Linux arm64 / Build (push) Successful in 1m3s
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user