Wrapped TCP listener with select call to enable timeout