Giter Club home page Giter Club logo

Comments (7)

riobard avatar riobard commented on September 12, 2024

Listener 为什么需要 deadline?

from go-shadowsocks2.

josh-chan avatar josh-chan commented on September 12, 2024

@riobard 想实现这个功能,但是 net.Listener Accept 没有deadline 会一直hang着做不到。
https://github.com/hydrogen18/stoppableListener/blob/master/listener.go

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

你用自己的 Listener.Accept,再用 core.StreamConnCipher.StreamConn 包一下就好了。

from go-shadowsocks2.

josh-chan avatar josh-chan commented on September 12, 2024

好吧,原来就是不想改太多。
刚看到服务器端这个报错日志:
failed to accept: accept tcp [::]:443: accept4: too many open files
nofile 已经够大了,51200, 是不是设个 timeout 能解决?

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

先看看没断开的连接是什么状态吧

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

@yjsslab 试下最新版,解决了

from go-shadowsocks2.

josh-chan avatar josh-chan commented on September 12, 2024

@riobard 嗯,好像是解决了.

from go-shadowsocks2.

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.