Add socket timeout feature