Vect0rZ / Quic.NET

A .NET C# Implementation of QUIC protocol - Google's experimental transport layer.
BSD 2-Clause "Simplified" License
376 stars 58 forks source link

Bug report QuicNet.Tests.ConsoleClient #12

Closed lordoffox closed 3 years ago

lordoffox commented 4 years ago

Describe the bug When i run QuickNet.Tests.ConsoleServer and QuicNet.Tests.ConsoleClient. I receive an exception ArgumentException at Program.cs line 34. byte[] data = stream.Receive();

Additional context The exception raise at QuicStream.cs line 117. _data.Add(0, frame.StreamData); When _data already have an item.

Vect0rZ commented 4 years ago

Hello, @lordoffox thank you for reporting the bug. It's currently being worked on, and this might require changes on the interfaces that send data.

Approaches:

  1. We might add additional Readers/Writers for Binary data as part of the stream, which will allow us to buffer the data before being sent.
  2. Close the stream immediately after data transmission and always open a new stream on a new data transfer.

The most likely approach will be point 1.

The QUIC protocol draft 27 is kind of vague on the messaging between the streams, and it's partly because it should be just a transfer medium rather than messaging implementation.

Thank you!

Vect0rZ commented 3 years ago

@lordoffox Fixed with efb916a