I just noticed that other people receiving data have the same problem: https://www.mathworks.com/matlabcentral/answers/115670-how-can-i-get-higher-throughput-using-fread-with-tcpip
Asynchronous TCP with fwrite: limited bandwidth compared to synchronous communication
3 次查看(过去 30 天)
显示 更早的评论
When using, e.g.
fwrite(tcpSocket, tcpData, 'uint8', 'async')
I notice that the maximum datarate I can achieve is about 4MBit/s, regardless of buffer size/chunk size. When making use of synchronous fwrite, I easily achieve datarates up to 100MBit/s.
I would prefer to stick to asyncronous writing, since my code is embedded in a GUI that should remain responsive while the data transfer runs in the background. Also the remote tcp side (which is the server in my case) reads data very fast.
Thanks!
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Code Generation for ARM Cortex-M and ARM Cortex-A Processors 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!