From 475279b1a1fda2b5ed318cf8a89eebd7a5c87425 Mon Sep 17 00:00:00 2001 From: steden <1470804@qq.com> Date: Wed, 4 Sep 2024 15:21:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9AReceiverMessageFunc?= =?UTF-8?q?=EF=BC=8C=E5=AE=9E=E7=8E=B0=EF=BC=9A=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=90=8E=EF=BC=8C=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E6=AF=8F=E5=8F=91=E4=B8=80=E6=AC=A1=E6=B6=88=E6=81=AF=EF=BC=8C?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E6=8C=81=E7=BB=AD=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ws/client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ws/client.go b/ws/client.go index 22eb2ce..3cca114 100644 --- a/ws/client.go +++ b/ws/client.go @@ -69,8 +69,8 @@ func (receiver *Client) Connect() error { return err } -// ReceiverJson 接收消息(并反序列化成val) -func (receiver *Client) ReceiverJson(val any) error { +// Receiver 接收消息(并反序列化成val) +func (receiver *Client) Receiver(val any) error { retMsg := make([]byte, receiver.msgBufferSize) n, err := receiver.conn.Read(retMsg) if err != nil { @@ -80,8 +80,8 @@ func (receiver *Client) ReceiverJson(val any) error { return json.Unmarshal(retMsg[:n], val) } -// Receiver 接收消息 -func (receiver *Client) Receiver() (string, error) { +// ReceiverMessage 接收消息 +func (receiver *Client) ReceiverMessage() (string, error) { var retMsg = make([]byte, receiver.msgBufferSize) n, err := receiver.conn.Read(retMsg) if err != nil {