More socket refinements