Make streams and vfs and http shared_ptr

This commit is contained in:
2025-09-29 02:22:27 -05:00
parent 71d0e36a5c
commit d785508571
61 changed files with 541 additions and 951 deletions

View File

@@ -15,7 +15,7 @@ namespace Tesses::Framework::Streams
TcpServer(uint16_t port, int32_t backlog);
TcpServer(std::string ip, uint16_t port, int32_t backlog);
TcpServer(std::string unixPath,int32_t backlog);
NetworkStream* GetStream(std::string& ip, uint16_t& port);
std::shared_ptr<NetworkStream> GetStream(std::string& ip, uint16_t& port);
uint16_t GetPort();
~TcpServer();
bool IsValid();
@@ -45,7 +45,7 @@ namespace Tesses::Framework::Streams
void Listen(int32_t backlog);
void Bind(std::string ip, uint16_t port);
void SetBroadcast(bool bC);
NetworkStream* Accept(std::string& ip, uint16_t& port);
std::shared_ptr<NetworkStream> Accept(std::string& ip, uint16_t& port);
size_t Read(uint8_t* buff, size_t sz);
size_t Write(const uint8_t* buff, size_t sz);
size_t ReadFrom(uint8_t* buff, size_t sz, std::string& ip, uint16_t& port);