Disable Nagle Algorithm on tcpclient

10 ビュー (過去 30 日間)
Levi Devries
Levi Devries 2020 年 11 月 4 日
回答済み: Manas Meena 2020 年 12 月 2 日
The tcpip function allowed a user to disable the Nagle algorithm. tcpip is being replaced by tcpclient, but I don't see the ability to disable Nagle's algorithm for tcpclient. Is it possible to disable it in MATLAB?

回答 (1 件)

Manas Meena
Manas Meena 2020 年 12 月 2 日
The matlabroot/toolbox/coder/rtiostream/src/rtiostreamtcpip/rtiostream_tcpip.c file shows how you can turn off Nagle's algorithm:
/* Disable Nagle's Algorithm*/
option = 1;
sockStatus = setsockopt(lFd,IPPROTO_TCP,TCP_NODELAY,(char*)&option,sizeof(option));
The code for your custom TCP/IP implementation can require modification.

タグ

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by