# Best place in code to setsockoptions from variables

**URL:** <https://www.ruby-forum.com/t/best-place-in-code-to-setsockoptions-from-variables/241672>\
**Category:** NGINX\
**Created:** [April 23, 2015, 2:52am UTC](https://www.ruby-forum.com/t/best-place-in-code-to-setsockoptions-from-variables/241672 "2015-04-23T02:52:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 23, 2015, 2:52am UTC](https://www.ruby-forum.com/t/best-place-in-code-to-setsockoptions-from-variables/241672/1 "2015-04-23T02:52:08Z")

</div>

A pointer on source modifications would be great.  
In which function is the logical/best place to set custom socket options  
after accept, from variable values set in nginx.conf, eg per location?  
or, is it best to copy and modify an existing extension that uses that  
hook. If so, which extension?  
thanks
