Finished implementing, now for the testing phase.

This commit is contained in:
2025-01-26 21:43:17 -08:00
parent 7bc4b9977d
commit 981b40d3b1
47 changed files with 2070 additions and 1597 deletions

View File

@@ -4,26 +4,26 @@
namespace ehs
{
BaseTCP::BaseTCP()
: addrType(AddrType::IPV6), localPort(0), remotePort(0), connection(false), bound(false), listening(false),
: ip(IP::V6), localPort(0), remotePort(0), connection(false), bound(false), listening(false),
connected(false)
{
}
BaseTCP::BaseTCP(const AddrType addrType)
: addrType(addrType), localPort(0), remotePort(0), connection(false), bound(false), listening(false),
BaseTCP::BaseTCP(const IP ip)
: ip(ip), localPort(0), remotePort(0), connection(false), bound(false), listening(false),
connected(false)
{
}
BaseTCP::BaseTCP(BaseTCP&& tcp) noexcept
: addrType(tcp.addrType), localAddr(std::move(tcp.localAddr)), localPort(tcp.localPort),
: ip(tcp.ip), localAddr(std::move(tcp.localAddr)), localPort(tcp.localPort),
remoteHostName(std::move(tcp.remoteHostName)), remoteAddr(std::move(tcp.remoteAddr)), remotePort(tcp.remotePort),
connection(tcp.connection), bound(tcp.bound), listening(tcp.listening), connected(tcp.connected)
{
}
BaseTCP::BaseTCP(const BaseTCP& tcp)
: addrType(tcp.addrType), localPort(0), remotePort(0), connection(false), bound(false), listening(false),
: ip(tcp.ip), localPort(0), remotePort(0), connection(false), bound(false), listening(false),
connected(false)
{
}
@@ -33,7 +33,7 @@ namespace ehs
if (this == &tcp)
return *this;
addrType = tcp.addrType;
ip = tcp.ip;
localAddr = std::move(tcp.localAddr);
localPort = tcp.localPort;
remoteHostName = std::move(tcp.remoteHostName);
@@ -44,7 +44,7 @@ namespace ehs
listening = tcp.listening;
connected = tcp.connected;
tcp.addrType = AddrType::IPV6;
tcp.ip = IP::V6;
tcp.localPort = 0;
tcp.remotePort = 0;
tcp.connection = false;
@@ -60,7 +60,7 @@ namespace ehs
if (this == &tcp)
return *this;
addrType = tcp.addrType;
ip = tcp.ip;
localAddr = Str_8();
localPort = 0;
remoteHostName = Str_8();
@@ -188,9 +188,9 @@ namespace ehs
return request;
}
AddrType BaseTCP::GetAddressType() const
IP BaseTCP::GetAddressType() const
{
return addrType;
return ip;
}
Str_8 BaseTCP::GetLocalAddress() const