timeout socket encapsulation for linux