Giter Club home page Giter Club logo

Comments (8)

davyxu avatar davyxu commented on May 3, 2024

你的建议是?

from cellnet.

sniperHW avatar sniperHW commented on May 3, 2024

别设上限了,一直for下去,任何情况下的正确性比性能更重要

from cellnet.

davyxu avatar davyxu commented on May 3, 2024

ok

from cellnet.

sniperHW avatar sniperHW commented on May 3, 2024

不过这会产生另一个问题,如果你主动调用了close,循环内无法感知到,所以最好是设置send超时,循环内判断是否调用了close

from cellnet.

davyxu avatar davyxu commented on May 3, 2024

https://github.com/sniperHW/kendynet-go/blob/master/kendynet/tcpsession.go
你的代码里已经有答案了, 测试结果怎样呢?

from cellnet.

sniperHW avatar sniperHW commented on May 3, 2024

我这也漏了我上面补充的那个close检测,测试比你的稍微好一点点,应该是因为我的包处理简单。

from cellnet.

davyxu avatar davyxu commented on May 3, 2024

嗯嗯, 我会参考借鉴你的一些代码. thanks

from cellnet.

sniperHW avatar sniperHW commented on May 3, 2024

不客气,我刚重新玩Go,很多东西还没弄懂,后面有问题还要请教请教你

from cellnet.

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.