Giter Club home page Giter Club logo

Comments (5)

shovon avatar shovon commented on May 28, 2024

Thanks for bringing up this issue. I will be looking into it on Saturday.

It's an insanely busy week for me.

Cheers.

from node-rudp.

amiiigh avatar amiiigh commented on May 28, 2024

I think there is a missing 'var' behind 'bools' on line 16 of Packet.js btw

from node-rudp.

amiiigh avatar amiiigh commented on May 28, 2024

Hey
An update on the problem.
I tried sending an html file from my laptop to a server using rudp and the server got the file with no problem ( file size: 200K)
But when I tried the library with a large file ( a pdf file 9M) the received file had different size every time I tried.
So I think it does not work with large files apparently.
I would appreciate if you could take a look at this.
In the meantime, I'm trying to read the code and to see if I can find something.

Thanks brother

from node-rudp.

amiiigh avatar amiiigh commented on May 28, 2024

Thanks for bringing up this issue. I will be looking into it on Saturday.

It's an insanely busy week for me.

Cheers.

Hey,
After banging my head on my wall enough I found the problem.
The problem was when we have enough windows to make the random function to generate the baseSequenceNumber same for two consecutive windows.

if (packet.getSequenceNumber() === this._syncSequenceNumber) { this._packetSender.send(Packet.createAcknowledgementPacket(packet.getSequenceNumber())); return; }

In this case, the server will stay desynced and send the ack for the sync packet. The client after seeing the ack for sync packet would continue sending data. Since the server is desynced, the server will ignore the incoming packets which make the system break!

Fix:
I will submit a pull request soon.
I fixed this if and also changed a couple of small things.
I would appreciate if you take a look at it.

Cheers <3

from node-rudp.

amiiigh avatar amiiigh commented on May 28, 2024

I made the pull request.

btw since I read the whole code I think I can write documentation for this library like what are the classes and what does each one do.

from node-rudp.

Related Issues (12)

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.