Adds some counters and timers
Implements blocking connect or timeout