#pragma once

#include <memory>
#include <string>

class Socket
{
    using SocketHandle = int;
public:

    Socket();

    ~Socket();

    static std::unique_ptr<Socket> Create();

    void SetPort(unsigned port);

    void SetHandle(SocketHandle handle);

    SocketHandle GetHandle() const;

    unsigned GetPort() const;

    std::string GetMessage() const;

    void SetMessage(const std::string& message);

    std::string getAddress() const;
    void setAddress(const std::string& address);

private:

    SocketHandle mHandle;
    unsigned mPort{0};
    std::string mMessage;
    std::string mAddress;
};

using SocketPtr = std::unique_ptr<Socket>;
