The main loop of the program will call ssh_message_get(session) to get messages as they come. they are not 1-1 with the protocol messages. then, the user will know what kind of a message it is and use the appropriate functions to handle it (or use the default handlers if she doesn't know what to do