Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sam Moggach
    @ezmicken
    any idea why a tcp connection might spam 0's indefinitely?
    Sam Moggach
    @ezmicken
    turns out i failed to count the bytes properly and couldn't realize it until I complain! oof.
    loving gnet btw nice work :thumbsup:
    Andy Pan
    @panjf2000
    just see this message and glad you've worked it out.
    the notifications from gitter seem to be a bit belated, I would find a way to solve this problem.
    Sam Moggach
    @ezmicken

    The problem came back so I rolled back my changes and confirmed they caused it.
    The culprit:

    reader.Peek(1)
    reader.Discard(1)

    to

    reader.ReadByte
    Andy Pan
    @panjf2000
    it's a bit hard to figure out the root cause based on this code snippet, maybe provide the whole codec?
    Sam Moggach
    @ezmicken
    sorry, nothing to do with gnet actually. I am using a bufio.Reader to read from a net.TCPConn. I call Peek(4)/Discard(4) to read how many bytes there are, then Peek(1)/Discard(1) until all those bytes are read.
    If I changed the second operation to ReadByte() then even after all the bytes are read any peek/read finds a 0 in the buffer indefinitely, as opposed to nothing like it did before. I thought I was actually spamming the stream with zeroes (with gnet server) but as soon as i put it back to Peek(1)/Discard(1) the problem went away.
    Andy Pan
    @panjf2000
    ok, then I guess we can pass this issue.
    garfield009
    @garfield009
    没有对应的客户端吗? @panjf2000
    Andy Pan
    @panjf2000
    目前没有
    garfield009
    @garfield009
    哦,好的,谢谢。
    kris425
    @kris425
    是否打算支持websocket
    Andy Pan
    @panjf2000
    gnet目前还是专注于做好底层网络通信这一块,应用层的支持像HTTP、WebSocket这些现在暂时不考虑
    Ram
    @Swaggadan
    Any plans for implementing splice?
    Ram
    @Swaggadan
    how to correctly fork this project, I get many import errors after i try to use it on my own repo
    Andy Pan
    @panjf2000
    Why would you fork gnet instead of importing it directly?@Swaggadan
    Or you were trying to modify the source code of gnet for your custom requirements?
    Ram
    @Swaggadan
    Yes, would like to test some changes.
    Ram
    @Swaggadan
    To expose the net.Conn
    I got it to work for windows code but for Unix i got many issues with import errors.
    Andy Pan
    @panjf2000
    I can't figure out why there are import errors in your project, could you provide more details?

    Any plans for implementing splice?

    Yes, I will implement splice if I got some time, probably in the next few weeks.

    Ram
    @Swaggadan
    If i fork your project, do i need to change any imports or should it work instantly out of the box?
    Andy Pan
    @panjf2000
    there is no difference between importing gent and other go libraries
    Ram
    @Swaggadan
    Anything i do to help you make the splice function faster? (including a donation)
    Ram
    @Swaggadan
    ?
    Andy Pan
    @panjf2000
    Working on the proxy feature with splice, but I have a day job, so the progress might not go very fast.

    Anything i do to help you make the splice function faster? (including a donation)

    I would appreciate it if you make a donation, but it's not a mandatory request, it's up to you.

    Andy Pan
    @panjf2000
    And sorry for the delay, the gitter often delays messages, I didn't get your message until today.
    Ram
    @Swaggadan
    Will definitely make a donation!
    Ram
    @Swaggadan
    Are there any necessary configuration for Ubuntu or the best Linux distro or specific settingd best for gnet performance?
    Ram
    @Swaggadan
    Testing splice for over 2000 connections seems to cause many drop connections but not sure why.
    Andy Pan
    @panjf2000
    How did you use splice in Go?
    Could you paste the code here?
    Ram
    @Swaggadan
    Can I pm you in private some how?
    Andy Pan
    @panjf2000

    Can I pm you in private some how?

    Send me an email and I reply to you with my what's app, FB messager, or telegram account.

    Ram
    @Swaggadan
    Thanks
    zxlwdgithub
    @zxlwdgithub

    Testing splice for over 2000 connections seems to cause many drop connections but not sure why.

    test 2w connections, shutdown directly

    unix.EMFILE(24)
    Ram
    @Swaggadan
    I dont understand.
    Ram
    @Swaggadan
    Any update concerning splice?