是否有.NET FastCGI库?

Mil*_*lan 5 .net fastcgi

我正在开发一个应该通过http连接的小型服务器.由于我希望它可以与不同的成熟http服务器一起使用,我选择了FastCGI作为通用接口.

现在我找不到一个实现FCGI接口的(免费).NET库,并为我做了所有艰苦的工作.你知道吗?

Ste*_*ger 5

请参阅 Mono.WebServer.FastCGI
https://github.com/mono/xsp/tree/master/src

这里还有一个 FastCGI客户端
http://sourceforge.net/projects/fcgidotnet/

FastCGI 规范在这里:
http://www.fastcgi.com/devkit/doc/fcgi-spec.html

您可以在这里找到符合 OWIN 标准的实现: https:
//github.com/mzabani/Fos

此外,这些库也很有趣:


HyperFastCGI: https:
//github.com/xplicit/HyperFastCgi


https://github.com/gigi81/sharpfastcgi

或#cgi
https://github.com/wmeyer/SharpCGI

如果您需要有关 FastCGI 客户端的更多示例,您可以查看这个 go 库

https://github.com/tomasen/fcgi_client


Jus*_*tin 3

据我所知(我也在寻找)

困难之一在于 FastCGI 似乎要求您将侦听器套接字的句柄传递给子进程,以代替普通的 StdIn 句柄 - 标准 .Net 类(进程、套接字等)的东西。不允许。这意味着在 .Net 中实现 FastCGI 库最终需要使用对本机 Windows 函数的 P/Invoke 调用来重新实现 Process 和 Socket 类。