Client-server connection

Hello,
I’m writing a QUIC client-server connection using Golang in a Mininet environment. I want to forward a file from the server to the client, so I send the whole stream over the connection and I create a buffer to read data from the stream and store it in the receiver file.
Everything went well until I added loss/delay options to the Mininet environment. Although the loss was only 1%, the number of packet loss was bigger than what was expected. Sometimes I lose more than half of the amount of data. I don’t know where the problem is exactly, if it is in my script or in the mininet environment. Please, could someone help understand where the problem is?

Hi @Hana_Elhachi,

This is difficult to answer without having details.

The first and foremost question is whether the observed behavior is a problem of your Go code, the QUIC package you use, or Mininet itself. (Maybe the QUIC protocol and Mininet’s way of simulating package loss and delay do not go well together.)

Hello @christophberger, thank you for your reply. I agree with you, but I don’t know how to determine where the issue is located? These are some lines from my code:
sender side:
data,err:=ioutil.ReadFile(file_name)
stream.Write(data)
receiver side: (after creating a buffer, new reader r …)
for{
n, err := io.ReadFull(r, bufer[:cap(buffer)])
buffer = buffer[:n]
total_data = append(total_data, buffer…)
if err != nil {
break
}
}
ioutil.WriteFile(my_file,total_data,0644)

This code uses io.Reader and io.Writer interfaces that are an abstraction of the actual network I/O. Packet loss happens at the network layer, which therefore is the place to start searching. I know next to nothing about QUIC internals and Mininet, but maybe someone else here in the community does?

Thank you so much for your help. I really appreciate that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.