Code Monkey home page Code Monkey logo

Comments (8)

MisterChangRay avatar MisterChangRay commented on July 28, 2024

这个可以支持下

from magic-byte.

MisterChangRay avatar MisterChangRay commented on July 28, 2024

现在已经吧序列化中的对象当参数传入了,你这个从对象里也可以直接获取得到啊

from magic-byte.

FULaBUla avatar FULaBUla commented on July 28, 2024

现在已经吧序列化中的对象当参数传入了,你这个从对象里也可以直接获取得到啊

是可以直接得到,但是再想如果直接能从 attachParams 动态取到就可以少了 Object 类型转换,然后再从里面 get 值的几步操作了,后续可以进阶给 attachParams 这个增强实现配置一个类型注册,就可以吧 customConvert 省了,这样越来越简单了。否则感觉 attachParams 存在的意义就不大了。而且这么提供一种方式可以让框架更灵活

from magic-byte.

MisterChangRay avatar MisterChangRay commented on July 28, 2024

attachParams 从对象获取的话,也是需要解析后才去拿值。和你直接从参数中拿一样的啊。

如果从偏移量拿的话,那自己也可以从字节数据里面自己定位拿。

from magic-byte.

MisterChangRay avatar MisterChangRay commented on July 28, 2024

你的消息类型不会设计在IP后面了吧 哈哈

from magic-byte.

FULaBUla avatar FULaBUla commented on July 28, 2024

你的消息类型不会设计在IP后面了吧 哈哈

协议是别的同事设计的,用的就很头疼唉

from magic-byte.

FULaBUla avatar FULaBUla commented on July 28, 2024

attachParams 从对象获取的话,也是需要解析后才去拿值。和你直接从参数中拿一样的啊。

如果从偏移量拿的话,那自己也可以从字节数据里面自己定位拿。

是这样的, 就是想省略一步类型转换再 get 的情况。而且目前传入的 Object 没法像改造后的 dynamicSizeof 从包含他的类的别的属性拿值,因为 Object 的类型仅是这个调用 customConvert 的属性的类型

from magic-byte.

MisterChangRay avatar MisterChangRay commented on July 28, 2024

嗯,传入的Object,应该传入根基对象

from magic-byte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.