arikawa/session
diamondburned 723aa0e4c3
session: Add Gateway{IsAlive,Error} methods
This commit adds the above 2 methods mostly for the user's convenience.

GatewayIsAlive will be useful when handling CloseError events and
determining if the session was fatal without needing to handle Open().

GatewayError builds upon GatewayIsAlive and returns an error. While the
user could call GatewayIsAlive and LastError themselves, doing so
without locking is technically racy if another thread wants to
reconnect.
2022-04-07 23:27:44 -07:00
..
shard state: Ignore state errors in API wrappers 2021-12-14 13:49:34 -08:00
session.go session: Add Gateway{IsAlive,Error} methods 2022-04-07 23:27:44 -07:00
session_test.go gateway: Refactor for a better concurrent API 2021-12-14 13:49:34 -08:00