Giter Site home page Giter Site logo

引用范围不正确 about jelly HOT 10 OPEN

yohann-codes avatar yohann-codes commented on September 3, 2024
引用范围不正确

from jelly.

Comments (10)

Yohann-Codes avatar Yohann-Codes commented on September 3, 2024

你用的JDK6吧,我用的JDK8,JDK8中已经没有匿名内部类和局部内部类只能访问final变量的限制了。

from jelly.

Yohann-Codes avatar Yohann-Codes commented on September 3, 2024

代码当然运行过啊!

from jelly.

dzyok avatar dzyok commented on September 3, 2024

哦,原来如此,我还是用的JDK7呢,没有怎么用过JDK8,只知道JDK8大概的一些特性,涨势识了

from jelly.

Yohann-Codes avatar Yohann-Codes commented on September 3, 2024

一起进步呦!

from jelly.

dzyok avatar dzyok commented on September 3, 2024

你碰到过这种情况没有,传输我是用的protobuf,就是通过自己来写处理业务的线程池,然后ctx.writeAndflush数据后,客户端只能接收到protobuf中的一部分参数值,需要的主要数据,始终传送不过来

from jelly.

Yohann-Codes avatar Yohann-Codes commented on September 3, 2024

没有

from jelly.

Yohann-Codes avatar Yohann-Codes commented on September 3, 2024

是不是编解码出错了

from jelly.

dzyok avatar dzyok commented on September 3, 2024

我知道是什么错了,如果只是handler那个线程里面,挨着执行writeAndFlush(),因为是protobuf,还需要执行数据的清除方法clearXXXXXX。我照着你的线程池来做,就不得行,clearXXXX方法需要在writeAndFlush方法返回Future,给future添加监听器完成事件,再调用clearXXXX。

from jelly.

xiaoyaomimi avatar xiaoyaomimi commented on September 3, 2024

请问为什么不使用protobuf,而选择使用json,你这么考虑的原因是什么,个人觉得protobuf更优秀一点

from jelly.

Yohann-Codes avatar Yohann-Codes commented on September 3, 2024

Protobuf性能确实是好一些,但是不太会用。

from jelly.

Related Issues (4)

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.