Comments (3)
skynet.pack 属于底层 api ,不理解它的工作原理的话,不要用它。
from skynet.
但调用 skynet.ret 时传入参数要求是已经序列化的,这时就要用到 skynet.pack
btw,
个人感觉 skynet.ret 的参数跟 skynet.send, skynet.call 不一致,调用者要知道怎么进行序列化,需要在外部调用相应协议的序列化函数,不是很合理
from skynet.
这是 api 的历史问题造成的. 主要是为了在函数中间返回远程调用, 以及早期一些协议的不一致.
为了向前兼容, 不可能在近期修改.
你可以对 skynet 的 api 做一次封装. 然后用你封装过的.
比如 lualib/mqueue.lua 这个就是一种封装. 没有你说的问题.
from skynet.
Related Issues (20)
- skynet websocket client 粘包问题
- skynet websocket 处理 header 后面第一个 payload HOT 1
- Lua 5.4.6浮点运算崩溃 HOT 5
- socket.read may never return when socket.close concurrently HOT 1
- mongo api的代码风格不一致问题
- 如何获取skynet的版本号 HOT 9
- httpc 如何使用Post form-data类型请求
- skynet的actor问题
- 在压测过程中遇到jemalloc 内存利用率过低问题
- skynet加载自定义c模块成功,table也能打印出两个函数名称,但是调用时函数为nil HOT 7
- 关于skynet.sleep时间不准确的问题 HOT 1
- sharedata.flush 导致 coredump HOT 2
- 副本集主从切换问题 HOT 2
- 多agent,服务之间发送消息延迟过高
- http发送get请求收到服务器回复之后几分钟之后才返回
- 多agent,服务之间消息延迟很高 HOT 1
- redis 链接 假如的密码不对,好像内存会一直上涨。 HOT 1
- 为什么skynet.wait里生成session没有check? HOT 1
- 宕机了,恳请云风大大帮我看看
- symbol SSL_set_connect_state version OPENSSL_1.0.0 not defined in file libssl.so.1.0.0
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.
from skynet.