Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,我客户端使用proto发送数据,服务端收到错误信息 #26

Open
chongbo2013 opened this issue Aug 15, 2019 · 1 comment

Comments

@chongbo2013
Copy link

服务端收到数据 unpack error Too large msg data recieved
数据量很小,但是为什么会报出这样的提示。

pkgMsg := &bean.PkgMsg{
Type: 1,
TaskID: "taskID------111", //php客户端分配的渲染任务ID唯一标识
PkgUrl: "PkgUrl", //用户素材包的下载地址
PkgMd5: "PkgMd5", //用户素材包的Md5用作校验
}

	msg, err := proto.Marshal(pkgMsg)
	fmt.Println(msg)
	if err != nil {
		fmt.Println("marshal msg err: ", err)
		// return
	}

	indexN, err := conn.Write(msg)
	if err != nil {
		fmt.Println("write error err ", err)
		// return
	}
@ayamzh
Copy link

ayamzh commented Jul 21, 2023

包前两位是msgid和lenth把。你只把body部分发过去了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants