Coder Social home page Coder Social logo

vnet's Introduction

Hi there 👋

Max's github stats

vnet's People

Contributors

ymmuse avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

wade-welles

vnet's Issues

一些建议 clarify code

  • client 、 server 都还比较好理解 pconn 也OK。但是 cs 和 backend 中很多似乎应该放在 client 或 pconn 或 server 的代码中。
    建议将代码文件简化为 client.go server.go pconn.go 和一个 vnet.go 只有实在不适合归类到 client server pconn 中的,及或 export 的func 才放在 vnet.go 中。这样比较容易读也更有秩序。
  • persistentConn 或者更适合改名为 virtualConn (vconn.go) ,如同README中说的,应该会更符合它的功能。
  • DialTCP 方法建议改为更兼容net中的 Dial(network, address) 的形式书写。也方便日后扩展为支持 unix socket 甚至 udp 的方法。
  • newPersistentConn 真只能放在 client 中么。如果可能的话,放在 pconn.go 并由 pconn自己管理会更清晰。
  • 可以先思考一下架构中的关键词,看看例如 backend、backendServer、backendConn 这类词是否还有更符合功能并更容易互相区别的名字。会让代码好读很多

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.