REMOTE_CONSOLE: Avoid rate limiting output to remote console sessions

As discussed in #865
This commit is contained in:
Mark Pizzolato 2020-06-02 12:06:18 -07:00
parent 52c1b5416f
commit e1a6a997eb
3 changed files with 10 additions and 1 deletions

View file

@ -2007,6 +2007,13 @@ sprintf(cmdbuf, "BUFFERED=%d", bufsize);
return tmxr_open_master (&sim_rem_con_tmxr, cmdbuf); /* open master socket */
}
t_bool sim_is_remote_console_master_line (void *lp)
{
return sim_rem_master_mode && /* master mode */
(((TMLN *)lp) >= sim_rem_con_tmxr.ldsc) && /* And it is one of the Remote Console Lines */
(((TMLN *)lp) < sim_rem_con_tmxr.ldsc + sim_rem_con_tmxr.lines);
}
/* Enable or disable Remote Console master mode */
/* In master mode, commands are subsequently processed from the

View file

@ -126,6 +126,7 @@ int32 sim_tt_inpcvt (int32 c, uint32 mode);
int32 sim_tt_outcvt (int32 c, uint32 mode);
t_stat sim_tt_settabs (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
t_stat sim_tt_showtabs (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
t_bool sim_is_remote_console_master_line (void *lp);
extern int32 sim_rem_cmd_active_line; /* command in progress on line # */

View file

@ -2205,7 +2205,8 @@ if ((lp->txbfd && !lp->notelnet) || (TXBUF_AVAIL(lp) > 1)) {/* room for char (+
sim_oline = save_oline; /* resture output socket */
}
sim_exp_check (&lp->expect, chr); /* process expect rules as needed */
if (!sim_is_running) { /* attach message or other non simulation time message? */
if (!sim_is_running && /* attach message or other non simulation time message? */
!sim_is_remote_console_master_line (lp)) {
tmxr_send_buffered_data (lp); /* put data on wire */
sim_os_ms_sleep(((lp->txbps) && (lp->txdeltausecs > 1000)) ? /* rate limiting output slower than 1000 cps */
(lp->txdeltausecs - 1000) / 1000 :