C#创建http服务器的插件MiniHttpd.dll
一款小巧的http服务器插件,在vs项目中新建一个项目,引入MiniHttpd.dll,输入一下代码,创建了一个http服务
HttpWebServer server = new HttpWebServer();
VirtualDirectory root = new VirtualDirectory();
server.ServerName = "BoEngine";
server.Root = root;
// Add a few files
//root.AddFile("notepad.exe");
//root.AddFile("autoexec.bat");
// Add a directory
// root.AddDirectory(@"c:\windows");
// Start the server
server.Start();
网友评论0