FeatherMC/src/util/SocketUtil.h

21 lines
345 B
C++

#pragma once
#include <cstdint>
#include <memory>
namespace Feather::Sockets
{
class TCPSocketHandle;
class TCPSocket
{
public:
TCPSocket(uint16_t port);
~TCPSocket();
inline bool IsValid() const { return m_socket != nullptr; }
private:
std::unique_ptr<TCPSocketHandle> m_socket;
};
}