#define RMRFL_MTCALL 0x02 // set up multi-threaded call support (rmr_init)
#define RMRFL_AUTO_ALLOC 0x03 // send auto allocates a zerocopy buffer
#define RMRFL_NAME_ONLY 0x04 // only the hostname:ip is provided as source information for rts() calls
+#define RMRFL_NOLOCK 0x08 // disable receive ring locking (user app ensures single thread or provides collision protection)
#define RMR_DEF_SIZE 0 // pass as size to have msg allocation use the default msg size
(All fields are exposed such that if a wrapper needs to dup the storage as it passes
into or out of their environment they dup it all, not just what we choose to expose.)
+
+ NOTE:
+ State is the RMR state of processing on the message. The transport state (tp_state)
+ will be set to mirror the value of errno for wrappers unable to access errno directly,
+ but will only be set if state is not RMR_OK. Even then, the value may be suspect as
+ the underlying transport mechanism may not set errno. It is strongly recommended that
+ user applications use tp_state only for dianostic purposes to convey additional information
+ in a log message.
*/
typedef struct {
int state; // state of processing
unsigned char* payload; // transported data
unsigned char* xaction; // pointer to fixed length transaction id bytes
int sub_id; // subscription id
+ int tp_state; // transport state (errno) valid only if state != RMR_OK, and even then may not be valid
// these things are off limits to the user application
void* tp_buf; // underlying transport allocated pointer (e.g. nng message)
unsigned char* id; // if we need an ID in the message separate from the xaction id
int flags; // various MFL_ (private) flags as needed
int alloc_len; // the length of the allocated space (hdr+payload)
+
+ void* ring; // ring this buffer should be queued back to
+ int rts_fd; // SI fd for return to sender
+
+ int cookie; // cookie to detect user misuse of free'd msg
} rmr_mbuf_t;
extern rmr_mbuf_t* rmr_alloc_msg( void* vctx, int size );
extern rmr_mbuf_t* rmr_call( void* vctx, rmr_mbuf_t* msg );
extern void rmr_close( void* vctx );
+extern void rmr_set_fack( void* vctx );
extern void* rmr_init( char* proto_port, int max_msg_size, int flags );
extern int rmr_init_trace( void* vctx, int size );
extern int rmr_payload_size( rmr_mbuf_t* msg );
extern int rmr_set_rtimeout( void* vctx, int time );
extern int rmr_set_stimeout( void* vctx, int time );
extern int rmr_get_rcvfd( void* vctx ); // only supported with nng
+extern void rmr_set_low_latency( void* vctx );
extern rmr_mbuf_t* rmr_torcv_msg( void* vctx, rmr_mbuf_t* old_msg, int ms_to );
extern rmr_mbuf_t* rmr_tralloc_msg( void* context, int msize, int trsize, unsigned const char* data );
extern rmr_whid_t rmr_wh_open( void* vctx, char const* target );
extern unsigned char* rmr_get_meid( rmr_mbuf_t* mbuf, unsigned char* dest );
extern unsigned char* rmr_get_src( rmr_mbuf_t* mbuf, unsigned char* dest );
extern unsigned char* rmr_get_srcip( rmr_mbuf_t* msg, unsigned char* dest );
+extern unsigned char* rmr_get_xact( rmr_mbuf_t* mbuf, unsigned char* dest );
extern rmr_mbuf_t* rmr_realloc_msg( rmr_mbuf_t* mbuf, int new_tr_size );
+extern rmr_mbuf_t* rmr_realloc_payload( rmr_mbuf_t* old_msg, int new_len, int copy, int clone );
extern int rmr_str2meid( rmr_mbuf_t* mbuf, unsigned char const* str );
extern void rmr_str2payload( rmr_mbuf_t* mbuf, unsigned char const* str );
extern void rmr_str2payload( rmr_mbuf_t* mbuf, unsigned char const* str );
extern int rmr_rcv_to( void* vctx, int time ); // DEPRECATED -- replaced with set_rtimeout
extern int rmr_send_to( void* vctx, int time ); // DEPRECATED -- replaced with set_stimeout
+// ---- misc user interface stuff ----------------------------------------------------------------------
+extern void rmr_set_vlevel( int new_level );
// --- uta compatability defs if needed user should define UTA_COMPAT ----------------------------------
#ifdef UTA_COMPAT