Add socket_set_keepalive

Fully tested on Linux