add reconnect to websocket, add get world json object

This commit is contained in:
lbenedar
2026-04-13 17:40:59 +03:00
parent cd204ebcf5
commit 5bb592ea8a
14 changed files with 321 additions and 103 deletions

View File

@@ -19,8 +19,12 @@ type FoundryTransport struct {
ReadChan types.ReadChannels
ExchangeChan types.ExchangeChannels
Http requests.FoundryHttpRequest
IsAuth bool
Http *requests.FoundryHttpRequest
ReconnectTimeout time.Duration
ReconnectNum int
ReconnectNumMax int
IsAuth bool
IsLogin bool
Models *db.Models
IsDbInit bool
@@ -36,8 +40,12 @@ func NewFoundryTransport(dbConn *sql.DB, logger *slog.Logger, httpConfig *reques
ProgressMsg: map[string]chan struct{}{},
},
Http: *httpConfig,
IsAuth: false,
Http: httpConfig,
ReconnectTimeout: 500 * time.Millisecond,
IsAuth: false,
IsLogin: false,
ReconnectNumMax: 1,
ReconnectNum: 0,
Models: db.NewModels(dbConn),
IsDbInit: false,