George Pontis

Fix for slow telnet on 4.1 ( Windows )

Discussion created by George Pontis on Mar 2, 2014
Latest reply on Mar 7, 2014 by Matthew Kendall

This subject has been discussed several times for earlier releases of MQX, but I never saw a clear-cut fix. My 4.1 app supports a telnet interface but was painfully slow. The fix was to modify the rtcs library slightly to disable the Nagle algorithm for the Telnet server. In the RTCS project, under apps, edit the file telnsrv.c. Around line 280 add the code to change this option:

 

   // Disable nagle algorithm for much faster performance with Windows clients

   option = 1;  

   error = setsockopt(telnetsrv_context.LISTENSOCK, SOL_TCP, OPT_NO_NAGLE_ALGORITHM, &option, sizeof(option));

   if (error) {

      RTCS_task_exit(creator, error);

   }

 

George

Outcomes