Add connection states
zpl-zak opened this issue · 0 comments
zpl-zak commented
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-sidelibrg_peer_get_state(ctx, peer)
for server-side (optional)