简单兼容成功

This commit is contained in:
injoyai
2025-02-21 09:55:35 +08:00
parent f6811aca01
commit ef42ac32b2
4 changed files with 30 additions and 10 deletions

View File

@@ -130,7 +130,7 @@ func (this *Client) handlerDealMessage(c *client.Client, msg ios.Acker) {
resp, err = protocol.MHistoryMinuteTrade.Decode(f.Data, conv.String(val))
case protocol.TypeKline:
resp, err = protocol.MKline.Decode(f.Data, conv.Uint8(val))
resp, err = protocol.MKline.Decode(f.Data, val.(protocol.KlineCache))
default:
err = fmt.Errorf("通讯类型未解析:0x%X", f.Type)
@@ -298,7 +298,7 @@ func (this *Client) GetKline(Type uint8, code string, start, count uint16) (*pro
if err != nil {
return nil, err
}
result, err := this.SendFrame(f, Type)
result, err := this.SendFrame(f, protocol.KlineCache{Type: Type, Code: code})
if err != nil {
return nil, err
}