Apply time factor on connection and socket timeouts

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>