nit: `int validConnection`. This is a C file.