zpl-c/librg

Add connection states

zpl-zak opened this issue · 0 comments

Client should be able to determine what state he currently is in, such as whether he's disconnected, currently connecting, awaiting authorization (waiting for connection accept event) and connected.

We already have librg_is_connected(..) method, which however is limited in its functionality. I'd recommend adding upper-mentioned states as a part of the library, so we can determine states easily.

Proposed methods:

  • librg_get_state(ctx) for client-side
  • librg_peer_get_state(ctx, peer) for server-side (optional)