Comments (5)
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.
I think there is a missing 'var' behind 'bools' on line 16 of Packet.js btw
from node-rudp.
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.
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.
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)
- More specific working example HOT 6
- emit event on receipt of all packets in a "message"
- How does this work for clients behind NATs? HOT 8
- Server HOT 8
- buffertools HOT 2
- getting the remote info on message HOT 1
- msg not rebuild?
- PendingPacket keeps going after client.close()
- callback for send HOT 5
- Turn `rudp` into a streaming library HOT 3
- validate packets - not all may be meant for the client HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rudp.