Hello!
On Sat, Sep 20, 2014 at 3:13 PM, fish.praha wrote:
> it is possible to implement the following functionality for ngx.socket.tcp
> like on PHP in CURL extension - curl_setopt($ch, CURLOPT_INTERFACE, $IP);
> CURLOPT_INTERFACEThe name of the outgoing network interface to use. This can be an interface name, an IP address or a host name.
> Thank you.
>
I think what you need here is a bind() method for the cosockets, which
can be called before connect(). The implementation should be similar
to the proxy_bind directive of ngx_proxy, for example:
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_bind
Patches welcome :)
Regards,
-agentzh