61 Commits

Author SHA1 Message Date
Kleissner
51336263f5 UDT Metrics: Add DataSent, DataReceived. Auto calculate data transfer speeds. 2022-03-16 23:35:49 +01:00
Kleissner
e2cda5b565 UDT: Record transfer metrics. 2022-03-14 06:13:52 +01:00
Kleissner
c9158cb15f UDT: Fix critical bugs: Virtual Connection should not block.
Revert close channel from last commit.
2022-02-27 04:11:59 +01:00
Kleissner
71cd90274c UDT: Fix race condition close of channel. 2022-02-26 17:42:46 +01:00
Kleissner
8704b7f657 UDT: Fix close bug. It kept sending ACKs/NAKs even though the underlying socket was already closed. Close #95 2022-02-26 16:29:03 +01:00
Kleissner
5f161c0c38 UDT: Fix ACK/NAK ddos by implementing a simple rate limiter. It uses a min/max time and doubles the wait time in between. 2022-02-26 15:41:35 +01:00
Peter Kleissner
332fbbf829 Update congestion_native.go 2022-02-21 00:31:15 +01:00
Peter Kleissner
66e351ca64 Update udtsocket_send.go 2022-02-21 00:30:30 +01:00
Peter Kleissner
e45dddd6f5 Update congestion_native.go
Remove non-used lines
2022-02-21 00:29:49 +01:00
f9f7d48e72 added fix to nak interval 2022-02-21 02:38:58 +04:00
Kleissner
94ed383489 UDT: Fix critical bug in NativeCongestionControl not using pointer. ackEvent immediate parameter. 2022-02-20 18:24:42 +01:00
Kleissner
a41de8a4db UDT: Fix critical bugs: congestion window size was not set on senders side; sentAck was not set in case ACK threshold wasn't reached, which caused resendACKTimer to fail to send 2022-02-19 23:37:04 +01:00
Kleissner
7d9e38a6f5 UDT: Revert removal of udtSocketRecv.ackInterval from b728b939ec close #55 2022-02-19 21:27:21 +01:00
Kleissner
700fc30586 UDT: Minor ticker change in recv. Make sure it is always closed. 2022-01-17 17:00:05 +01:00
Kleissner
1af98ab141 UDT: Improve performance by relying on a single ticker instead of creating new ones for ACK/NAK each outgoing packet.
Creating new tickers was huge stress for the gc reducing performance (according to pprof 35% was spent on runtime.siftdownTimer).
2022-01-17 04:28:39 +01:00
Kleissner
b3f1293f3c UDT: closing messageOut results into too fast closing. Don't close it for now as an ugly bush fix. 2021-12-14 01:20:16 +01:00
Kleissner
10e5213944 UDT: Fix the close problem: Have a regular Close() function that may be called after reading/writing is done, and a Terminate() function that can be called anytime. 2021-12-13 22:52:42 +01:00
Kleissner
7adadf9ad5 UDT: Fix critical bugs that appear during high packet loss. Recv: Implement resending ACKs (until ACK2'ed). Send: Implement unsolicited data resending of unacked data packets. Double sending time each try to prevent ddos. 2021-12-13 16:21:53 +01:00
Kleissner
ca58296e65 UDT: Fix race condition 'send on closed channel' by introducing a separate termination signal. 2021-12-13 13:30:23 +01:00
Kleissner
9f2783349e Fix race condition in UDT, check if socket is nil before closing it 2021-12-11 21:43:06 +01:00
Kleissner
a26900755b UDT: Resend NAKs every SynTime until missing packets are received. Fix #70
Fix additional divide by 0 bug
2021-12-08 04:09:48 +01:00
Kleissner
85dcb9d256 UDT: Multiplexer pass down external termination signal. This makes sure any socket reader will return with EOF and does not hang.
Change transferSequenceTimeout to 1 minute which is more appropriate.
2021-12-08 01:36:50 +01:00
Kleissner
34e48c09df UDT bug: Fix #68 fillDataToMTU, appended slice was not returned. 2021-12-04 03:52:34 +01:00
Kleissner
eb0ad540fe UDT: Finally fixing this piece of crap by rewriting the send logic. Close #58 2021-11-11 18:47:10 +01:00
Kleissner
014d4a34ee UDT: Fix in receiveLossHeap.Range 2021-11-08 19:26:53 +01:00
Kleissner
80bf639aea UDT: Provide io.EOF signal in udtSocket.fetchReadPacket. Otherwise readers may linger forever. 2021-11-08 05:12:40 +01:00
Kleissner
c44b05b9c1 UDT: Remove buggy EXP code. It caused wrong termination. It is not needed; the Peernet protocol handles connectivity. 2021-11-08 04:57:21 +01:00
Kleissner
f3d5f23cf9 Transfer: Record close reason of underlying library (UDT). This helps for debugging issues. Close #54 2021-11-08 04:40:53 +01:00
Kleissner
2924f0074d UDT: Redeveloped receiving code to fix the packet reassembly bugs. 2021-11-08 00:14:56 +01:00
Kleissner
0d62c215ee UDT: Fixing #43 #49 #51. File transfer works in test environment.
More tests needed for production testing. Internet MTU needs to be tested.
2021-11-05 03:19:29 +01:00
Kleissner
f76426aa48 UDT: Remove the datapacket_heap with the new heap code 2021-11-05 01:06:02 +01:00
Kleissner
8502cb15cf UDT: Fix the first piece of !@#$ heap code. Rewrite from scratch. 2021-11-05 00:41:06 +01:00
Kleissner
bfe2985149 UDT: Remove broken sentAck2. Always send ACK2 in response to an ACK. No need for artificial delay. 2021-11-04 23:43:18 +01:00
Kleissner
1573ded639 UDT: Fix invalid initial packet sequence number when random number was a signed negative int 2021-11-04 22:35:57 +01:00
Kleissner
d0b5db9437 UDT: Removing light ACK. This reduces complexity. 2021-11-04 21:20:47 +01:00
Kleissner
b728b939ec UDT: Remove ackInterval which was never set anyway. Instead, send ACK every few packets depending on congestion window and count of sent packets.
Removing LightACK. The implementation of it was confusing (it competed with ACK in a race condition) and rather pointless. LightACKs will be ditched completely to get to a working version.
2021-11-04 20:47:34 +01:00
Kleissner
cce68e9abe UDT: Fix packets being resent are not stored on the to-acknowledge list.
Add return statement in udtSocketSend.processDataMsg which was incorrectly removed with de9b67e751
2021-11-04 18:22:31 +01:00
Kleissner
e6846c232c UDT: Fix another bug, this time in udtSocket.Read. This UDT library is a fucking piece of !@#$ code that deserves a special place in hell. It probably takes longer fixing this piece of !@#$ than writing a new library from scratch. booh! 2021-11-04 17:05:53 +01:00
Kleissner
e141510b9c UDT: Fix divide by zero 2021-11-04 14:17:03 +01:00
Kleissner
29061318da UDT: Fix bug in packet.Add 2021-11-04 14:09:48 +01:00
Kleissner
de9b67e751 UDT: Minor refactor of udtSocketSend.processDataMsg 2021-11-03 21:07:43 +01:00
Kleissner
4bb8ac7adf UDT: Fix critical bug in udtSocket.Write use after return. CC #43 2021-11-03 20:57:04 +01:00
Kleissner
62c262e2b6 UDT: Fixing critical bugs in heap code. Fixing endless loops! #51 #49 2021-11-03 20:52:32 +01:00
Kleissner
0f546caed0 UDT: Fix a bug in udtSocketRecv.ingestData. The wrong sequence identifier was pushed to the lossList. #43 2021-11-01 09:09:30 +01:00
Kleissner
8b593975b6 UDT: Fix closing channel twice in race condition when calling udtSocket.Close() multiple times 2021-11-01 09:02:35 +01:00
Kleissner
81b409d5a4 UDT: Fix divide by zero. 2021-11-01 08:50:33 +01:00
Kleissner
0368752324 UDT: Fix bug in NativeCongestionControl.OnNAK that causes a crash when the provided losslist is empty 2021-10-28 17:16:14 +02:00
Kleissner
9ddca35277 Transfer: Set max packet size.
udt: Improve error messages. Fix bug in udtSocketSend.processDataMsg, the header was not considered in the max size.
webapi: New /file/view API which is useful for immediate testing of file transfer.
2021-10-28 04:06:10 +02:00
Kleissner
b0f98fdd4f UDT: Simplify closing behavior - removing multiplexer level for reporting close of listener/socket back to upstream provided closer. 2021-10-25 09:56:28 +02:00
Kleissner
13ef42ac39 UDT: Reduce complexity of multiplexer, removes a race condition, increases stability. pktOut was not needed. 2021-10-25 09:46:36 +02:00