stuff-from-scratch/src/network/sockets/Socket.cpp
2021-03-29 21:31:24 +01:00

49 lines
611 B
C++

#include "Socket.h"
Socket::Socket()
: mPort(8888),
mMessage(),
mHandle(-1)
{
}
Socket::~Socket()
{
}
void Socket::SetHandle(SocketHandle handle)
{
mHandle = handle;
}
Socket::SocketHandle Socket::GetHandle() const
{
return mHandle;
}
std::unique_ptr<Socket> Socket::Create()
{
return std::make_unique<Socket>();
}
std::string Socket::GetMessage() const
{
return mMessage;
}
void Socket::SetMessage(const std::string& message)
{
mMessage = message;
}
void Socket::SetPort(unsigned port)
{
mPort = port;
}
unsigned Socket::GetPort() const
{
return mPort;
}