support socket returned by accept as object