Video Streaming using non http backend, Ref ngx_drizzle
agentzh at gmail.com
Tue Jun 12 11:43:02 UTC 2012
On Tue, Jun 12, 2012 at 3:01 PM, sammy_raul <sammyraul1 at gmail.com> wrote:
> I am trying to understand lua module.
> Using the above script in the conf file I am able to connect to my upstream.
> I have few questions regarding the Lua module.
> 1)How I can send some data i.e I have to send a message to my backend
> probably which is more than a simple string. I have to construct it and
> encode it. Probably I need to add to the c function I can see
> ngx_http_lua_socket_tcp_send is used to send data over Nginx Socket, but I
> could not figure out how I can modify this function and which buffers I need
> to put my own data.
> 2)Before sock:receive I need to decrypt the data before sending to the
> client. I think I can decode in the print function in lua_output.c where I
> receive the data from upstream. Is that correct.
You can just try doing encrypting and decrypting on the Lua level.
It's a scripting language anyway and you're free to use the classic
Lua/C API or LuaJIT FFI to extend your Lua script with C code if
It's not recommended, however, to patch ngx_lua cosocket's C
More information about the nginx