chatofskynet's People
Forkers
zzh442856860 fanguangdong jackini zhangf911 kerasking iqwxiaopeng quinsmpang shenyanjun amorwilliams hdzz aliwangzai interfacekun gengdavid zhaochenglin yycmmc fashgek bluce angolar lzb991435344chatofskynet's Issues
消息发送
我使用你的客户端没有异常
我使用你的客户端向skynet发送消息时,服务器端出现异常,发生在接受消息时--
--排除到最后问题为消息没有注册
--这个问题的解决思路是这样的
关于src/app/scenes/protobuf.lua文件
protobuf.lua这个文件加载了/protobuf/c.lua这个文件是在那下载或者生成,我找不得这个文件
有关传递消息
在客户端运行(你的例子里面的代码)
function messageManager:getProcessMessage(version,messageId,protobufMessage)
print("********")
print(protobufMessage)
local packA = string.pack(">hiz",version,messageId,protobufMessage)
local byteArrayA = ByteArray.new()
byteArrayA:writeBuf(packA)
local packAlen = byteArrayA:getLen() --得到长度
--多了个长度信息
local packB = string.pack(">hhiz",packAlen,version,messageId,protobufMessage)
local byteArrayB = ByteArray.new()
byteArrayB:writeBuf(packB)
return byteArrayB
end
在服务端建立连接接受到消息后不能正常解析消息(你例子的代码)
skynet.register_protocol {
name = "client",
id = skynet.PTYPE_CLIENT,
unpack = function (msg, sz)
return host:dispatch(msg, sz)
end,
..........
}
运行到这里出现警告
:0100000e] lua call [100000d to :100000e : 0 msgsz = 19] error : �[31m./lualib/skynet.lua:564: ./lualib/sproto.lua:111: bad argument #2 to 'unpack' (number expected, got no value)
stack traceback:
[C]: in function 'assert'
./lualib/skynet.lua:564: in function <./lualib/skynet.lua:544>�[0m
是否还缺少文件导致解析失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.