Assert that the socket is used correctly