use a typedef enum for the connection return codes