Great plan! I like both the copas style API and node style API. With Lua's string matching APIs I can easily parse the HTTP headers and with the http-parser library I can also implement the HTTP protocol at a great performance. But Copas still has lots of limits for example, copas doesn't work with OpenSSL bindings very well. With a Lua-UV binding I think I will have more freedom to implement the LuaSocket buffering in Lua so I can add the OpenSSL support to my orignal Copas-based version. And it'll be easy for lots of Lua modules written in Copas style to use UV's epoll, IOCP and kqueue support.
在 2014年8月28日星期四UTC+8下午10时17分14秒,Tim Caswell写道: > > Cool stuff. I'm currently adding the missing features to luvit/luv. This > week I'm working on revamping luv.spawn to support all kinds of pipes and > fd passing over stdio, adding proper socket support after that should be > easy. > > Unless you like the node.js style API sugar that luvit adds on top of > libuv I would recommend using luv directly. The plan is to replace luvit's > libuv bindings internally with the luv project. Then luvit will be the > node style sugar on top with implicit event loop, openssl, zlib, etc all > bundled into a single runtime/platform. Luv is a normal luv library that > can be used from luajit, lua, or luvit. Since luv exposes the libuv API > without adding any opinion on top you could write your code in copas style > without too much overhead if you preferred that. > > > On Wed, Aug 27, 2014 at 11:21 PM, Zyxwvu S <[email protected] > <javascript:>> wrote: > >> I wrote a PHP-enabled Web Server for Luvit and am looking for some >> suggestions: >> >> https://github.com/imzyxwvu/zywebd-luvit >> >> Please try it and help me correct my errors. Thanks. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "luvit" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "luvit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
