Allow you do explicitly close stream, vfs

This commit is contained in:
2025-09-29 03:53:54 -05:00
parent d785508571
commit 234ec372a4
19 changed files with 54 additions and 7 deletions

View File

@@ -771,10 +771,15 @@ namespace Tesses::Framework::Streams {
if(sz2 < 0) return 0;
return (size_t)sz2;
}
NetworkStream::~NetworkStream()
void NetworkStream::Close()
{
if(this->owns && this->success)
NETWORK_CLOSE(this->sock);
this->success=0;
}
NetworkStream::~NetworkStream()
{
Close();
}
void NetworkStream::SetNoDelay(bool noDelay)
{
@@ -888,6 +893,10 @@ NetworkStream::~NetworkStream()
void NetworkStream::SetNoDelay(bool noDelay)
{
}
void NetworkStream::Close()
{
}
uint16_t NetworkStream::GetPort()
{