+int
+jsonrpc_session_get_status(const struct jsonrpc_session *s)
+{
+ return s && s->rpc ? jsonrpc_get_status(s->rpc) : 0;
+}
+
+int
+jsonrpc_session_get_last_error(const struct jsonrpc_session *s)
+{
+ return s->last_error;
+}
+
+void
+jsonrpc_session_get_reconnect_stats(const struct jsonrpc_session *s,
+ struct reconnect_stats *stats)
+{
+ reconnect_get_stats(s->reconnect, time_msec(), stats);
+}
+
+void
+jsonrpc_session_enable_reconnect(struct jsonrpc_session *s)
+{
+ reconnect_set_max_tries(s->reconnect, UINT_MAX);
+ reconnect_set_backoff(s->reconnect, RECONNECT_DEFAULT_MIN_BACKOFF,
+ RECONNECT_DEFAULT_MAX_BACKOFF);
+}
+