mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-08 15:55:46 +00:00
Make streams and vfs and http shared_ptr
This commit is contained in:
@@ -7,17 +7,14 @@ namespace Tesses::Framework::Http
|
||||
{
|
||||
class MountableServer : public IHttpServer
|
||||
{
|
||||
IHttpServer* root;
|
||||
bool owns;
|
||||
std::vector<std::pair<std::string,std::pair<bool,IHttpServer*>>> servers;
|
||||
std::shared_ptr<IHttpServer> root;
|
||||
std::vector<std::pair<std::string,std::shared_ptr<IHttpServer>>> servers;
|
||||
std::string Subpath(Filesystem::VFSPath fullPath, Filesystem::VFSPath offsetPath);
|
||||
bool StartsWith(Filesystem::VFSPath fullPath, Filesystem::VFSPath offsetPath);
|
||||
public:
|
||||
MountableServer();
|
||||
MountableServer(IHttpServer* root, bool owns);
|
||||
MountableServer(IHttpServer& root);
|
||||
void Mount(std::string path, IHttpServer* server, bool owns);
|
||||
void Mount(std::string path, IHttpServer& server);
|
||||
MountableServer(std::shared_ptr<IHttpServer> root);
|
||||
void Mount(std::string path, std::shared_ptr<IHttpServer> server);
|
||||
void Unmount(std::string path);
|
||||
bool Handle(ServerContext& ctx);
|
||||
~MountableServer();
|
||||
|
||||
Reference in New Issue
Block a user