SSC Convenience Routines ------------------------- Several SSC convenience routines are provided on the SSC-side to support simplistic RMC use cases. In general all convenience routines are synchonous. The list includes: rmc_open() rmc_send_msg() rmc_rpc() rmc_waitfor_msg() By convention, all routines with post-pended with _ex are considered asynchronous routines. All synchronous convenience routines are layered on the more powerfull async version. The flexibility offered by the convenience routines is limited, and is typically not well suited when application become complex (i.e: apps are inherenly async, or handle multiple sessions, or mixed TCP and RMC operation). Synchronization with rmc_waitfor_msg ------------------------------------ By default, the SSC-side code is designed to be used in conjunction with select. RMC provides routines that map sockets to sessions and sessions to sockets. When a session is created, the socket is retrieved, included in the select fd_set and then select is used to wait for msgs. When select first, the fd is converted back to a session, and the rmc_get_completed_msg() call is used to process completed messages. Many applications have simple wait loops and and don't require the complexity of select. The routine rmc_waitfor_msg() is provided for these situations. If offloads all the select handling from the application write. The rmc_waitfor_msg() routine blocks until a send msg completes or an incoming msg arrives at the endpoint. It supports a timeout argument that limits the period the call will block waiting for message completion events. rmc_waitfor_msg() can wait for a single message or for the next message to complete on a session. The rmc_waitfor_msg() routine will process incoming messages for all RMC sessions. However, it will only return completed messages on the session indicated. This mechanism prevents messages from being lost across sessions when waiting on one session.