Closed m11y closed 3 years ago
The websocket connection may be broken at some time,its good that gate sdk will do auto reconnect,but our business need to know the market is acutally do not available when connection is broken.
Perhaps provide a method like below:
type ConnState string
const (
Connected ...
Connecting ...
Disconnected ...
)
func (ws *WsService) GetConnState() ConnState {
// ...
}
The websocket connection may be broken at some time,its good that gate sdk will do auto reconnect,but our business need to know the market is acutally do not available when connection is broken.
Perhaps provide a method like below:
type ConnState string const ( Connected ... Connecting ... Disconnected ... ) func (ws *WsService) GetConnState() ConnState { // ... }
at v0.1.8 Release has added a method GetConnection()
to get the connection. You can use this connection to solve the situation of you. And you can visit gorilla/websocket to get more info.
Close due to long time inactivity
This issue is unclear of the programming language used, what connection state and why do you need it