mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7dd7fe0bf | ||
|
|
9fb1a3b651 |
@@ -181,6 +181,11 @@ func (this *Client) handlerDealMessage(c *client.Client, msg ios.Acker) {
|
||||
|
||||
}
|
||||
|
||||
// SetTimeout 设置超时时间
|
||||
func (this *Client) SetTimeout(t time.Duration) {
|
||||
this.Wait.SetTimeout(t)
|
||||
}
|
||||
|
||||
// SendFrame 发送数据,并等待响应
|
||||
func (this *Client) SendFrame(f *protocol.Frame, cache ...any) (any, error) {
|
||||
f.MsgID = atomic.AddUint32(&this.msgID, 1)
|
||||
|
||||
@@ -4,6 +4,14 @@ import (
|
||||
"github.com/injoyai/tdx"
|
||||
)
|
||||
|
||||
func GetBjCodes() ([]*tdx.BjCode, error) {
|
||||
return tdx.GetBjCodes()
|
||||
func GetBjCodes() ([]string, error) {
|
||||
cs, err := tdx.GetBjCodes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ls := []string(nil)
|
||||
for _, v := range cs {
|
||||
ls = append(ls, "bj"+v.Code)
|
||||
}
|
||||
return ls, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user