2018-03-10 21:26:19 +00:00
|
|
|
package connections
|
|
|
|
|
2018-03-15 16:33:26 +00:00
|
|
|
// ConnectionState defines the various states a connection can be in from disconnected to authenticated
|
2018-03-10 21:26:19 +00:00
|
|
|
type ConnectionState int
|
|
|
|
|
2018-03-15 16:33:26 +00:00
|
|
|
// Connection States
|
|
|
|
// DISCONNECTED - No existing connection has been made, or all attempts have failed
|
|
|
|
// CONNECTING - We are in the process of attempting to connect to a given endpoint
|
|
|
|
// CONNECTED - We have connected but not yet authenticated
|
|
|
|
// AUTHENTICATED - im.ricochet.auth-hidden-server has succeeded on thec onnection.
|
2018-03-10 21:26:19 +00:00
|
|
|
const (
|
|
|
|
DISCONNECTED ConnectionState = iota
|
|
|
|
CONNECTING
|
|
|
|
CONNECTED
|
|
|
|
AUTHENTICATED
|
2018-03-15 20:53:22 +00:00
|
|
|
FAILED
|
2018-05-30 17:41:02 +00:00
|
|
|
KILLED
|
2018-03-10 21:26:19 +00:00
|
|
|
)
|