diff --git a/config/config.dev.yaml b/config/config.dev.yaml index 574c6a6..6817ddf 100644 --- a/config/config.dev.yaml +++ b/config/config.dev.yaml @@ -12,8 +12,10 @@ client: count: 100 usn: [ 1,10000000 ] http: - address: "https://www.hlsq.asia/api" - port: 0 +# address: "https://www.hlsq.asia/api" +# port: 0 + address: "http://127.0.0.1" + port: 8503 websocket: # address: "ws://47.108.184.184/ws/" # address: "wss://www.hlsq.asia/ws/" diff --git a/go.mod b/go.mod index d47cedc..472036f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-robot go 1.23.1 require ( - git.hlsq.asia/mmorpg/service-common v0.0.0-20260108144540-69e82ec0fe77 + git.hlsq.asia/mmorpg/service-common v0.0.0-20260110081319-015e333b88c0 github.com/gorilla/websocket v1.5.3 github.com/judwhite/go-svc v1.2.1 google.golang.org/protobuf v1.36.9 diff --git a/go.sum b/go.sum index 96ead7d..c0f777c 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,5 @@ -git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78 h1:4CP8w5jHDOdN7hym8YrtioxNDd7PS2WcZDrO6dtY344= -git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc= -git.hlsq.asia/mmorpg/service-common v0.0.0-20260108144540-69e82ec0fe77/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc= +git.hlsq.asia/mmorpg/service-common v0.0.0-20260110081319-015e333b88c0 h1:GWd3ipi7UveYBAxe+UnTplqiKxOt25NVC5CC634lbuI= +git.hlsq.asia/mmorpg/service-common v0.0.0-20260110081319-015e333b88c0/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= diff --git a/internal/ws/client.go b/internal/ws/client.go index ee003fb..f9f566d 100644 --- a/internal/ws/client.go +++ b/internal/ws/client.go @@ -25,7 +25,7 @@ type Client struct { cancel context.CancelFunc writeChan chan []byte - USN int64 + USN string } func NewClient(httpAddr, websocketAddr string) *Client { @@ -56,7 +56,7 @@ func (c *Client) Start() { Code int `json:"code"` Msg string `json:"msg"` Data struct { - USN int64 `json:"usn"` + USN string `json:"usn"` Name string `json:"name"` AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"`