frevib / io_uring-echo-server

io_uring echo server
MIT License
365 stars 55 forks source link

redundant text sent #1

Closed CarterLi closed 4 years ago

CarterLi commented 4 years ago
$ telnet 127.0.0.1 12345                                                                                       13:58:11
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
1234567890
1234567890
12345
12345
890

expected:

$ telnet 127.0.0.1 12345                                                                                       13:59:12
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
1234567890
1234567890
12345
12345
frevib commented 4 years ago

Thank for submitting the issue.

This is because a fixed buffer size is used for receiving/sending the message. This project was optimized for performance testing throughput, so just it will just receive and send up to MAX_MESSAGE_LEN bytes. I'll have a look to improve it, while not adding too much CPU cycles.

CarterLi commented 4 years ago

This is because a fixed buffer size is used for receiving/sending the message.

Yeah I knew it

This project was optimized for performance testing throughput

But firstly the program should be correct