Hi,
On 09/03/2018 05:47 AM, Bjørnar Ness wrote:
> Is it possible to get the socket filedescriptor from ngx.req.socket?
>
> Would like to use ffi to do:
>
> getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len)
There is a related PR that you may be interested in:
https://github.com/openresty/lua-nginx-module/pull/1147
However, as agentzh said, exposing the underlying fd could break some
encapsulation behavior, so beware.
Best,
Thibault