Setting socket options for http connections

155 views
Skip to first unread message

jithi...@gmail.com

unread,
Apr 11, 2016, 1:21:01 PM4/11/16
to golang-nuts
Hello Experts,

I am a newbie to go language. I plan to use go language for developing an http server and client. While browsing through the list of features supported in http server package I do not find a way to set socket option in the package (May be I just do not know how to use it). I am in a need to set DSCP option (IP_TOS) in the fd used for the http connection. However I am not sure if setting socket options like SO_KEEPALIVE, IP_TOS etc at a socket level is possible for http package (Although I find syscall option to set socket options, I do not find a way to get fd from http package).

I had a look at https://github.com/golang/go/issues/6890 however not sure if there is a support implemented in Go 1.5 or 1.6.

It would be a great help if you could provide me a way to solve this problem as it is a pre-requisite for me to support this in my http server and client.

Thanks for the help

Regards,
Jithin
Reply all
Reply to author
Forward
0 new messages