Fixed TCP for Windows.
This commit is contained in:
@@ -105,13 +105,13 @@ int main()
|
|||||||
|
|
||||||
if (!response.IsNum())
|
if (!response.IsNum())
|
||||||
{
|
{
|
||||||
ehs::Console::Clear(); // Clear the console's buffer.
|
ehs::Console::Clear(); // Clear the console's buffer.
|
||||||
return main(); // Repeat process if given response is not a number.
|
return main(); // Repeat process if given response is not a number.
|
||||||
}
|
}
|
||||||
|
|
||||||
ehs::UInt_8 age = response.ToDecimal<ehs::UInt_8>(); // Converts the string number into a number based primitive.
|
ehs::UInt_8 age = response.ToDecimal<ehs::UInt_8>(); // Converts the string number into a number based primitive.
|
||||||
|
|
||||||
ehs::Console::Write("Your age is " + ehs::Str_8::FromNum(age) + "."); // Write the console with the age converted back to string.
|
ehs::Console::Write_8("Your age is " + ehs::Str_8::FromNum(age) + "."); // Write the console with the age converted back to string.
|
||||||
|
|
||||||
ehs::Uninitialize();
|
ehs::Uninitialize();
|
||||||
|
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ namespace ehs
|
|||||||
return hdl != EHS_INVALID_SOCKET;
|
return hdl != EHS_INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCP::Bind_v6(const Str_8& address, UInt_16 port)
|
void TCP::Bind_v6(const Str_8 &address, const UInt_16 &port)
|
||||||
{
|
{
|
||||||
sockaddr_in6 result = {};
|
sockaddr_in6 result = {};
|
||||||
result.sin6_family = AF_INET6;
|
result.sin6_family = AF_INET6;
|
||||||
@@ -451,7 +451,7 @@ namespace ehs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCP::Bind_v4(const Str_8& address, UInt_16 port)
|
void TCP::Bind_v4(const Str_8 &address, const UInt_16 &port)
|
||||||
{
|
{
|
||||||
sockaddr_in result = {};
|
sockaddr_in result = {};
|
||||||
result.sin_family = AF_INET;
|
result.sin_family = AF_INET;
|
||||||
|
|||||||
Reference in New Issue
Block a user