Socket: Fix type constraints