Whitespace and pointer cleanup.

This commit is contained in:
jmsgrogan 2021-03-29 21:31:24 +01:00
parent 6fc0b8dca8
commit a03eb9599f
32 changed files with 441 additions and 468 deletions

View file

@ -1,20 +1,21 @@
#pragma
#pragma once
#include <memory>
class Socket;
using SocketPtr = std::shared_ptr<Socket>;
using SocketPtr = std::unique_ptr<Socket>;
class SocketInterface
class ISocketInterface
{
public:
SocketInterface();
ISocketInterface() = default;
static std::unique_ptr<SocketInterface> Create();
void CreateSocket(SocketPtr socket);
void Listen(SocketPtr socket);
void Run(SocketPtr socket);
virtual ~ISocketInterface() = default;
virtual void InitializeSocket(const SocketPtr& socket) = 0;
virtual void Listen(const SocketPtr& socket) = 0;
virtual void Run(const SocketPtr& socket) = 0;
};
using SocketInterfaceUPtr = std::unique_ptr<SocketInterface>;
using ISocketInterfaceUPtr = std::unique_ptr<ISocketInterface>;