mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
New timing infrastructure. There's a new function schedule_timer()
which pretty much any module can call to request a call-back in the future. So terminal.c can do its own handling of blinking, visual bells and deferred screen updates, without having to rely on term_update() being called 50 times a second (fixes: pterm-timer); and ssh.c and telnet.c both invoke a new module pinger.c which takes care of sending keepalives, so they get sent uniformly in all front ends (fixes: plink-keepalives, unix-keepalives). [originally from svn r4906] [this svn revision also touched putty-wishlist]
This commit is contained in:
20
doc/udp.but
20
doc/udp.but
@ -75,21 +75,23 @@ Some ports of PuTTY - notably the in-progress Mac port - are
|
||||
constrained by the operating system to run as a single process
|
||||
potentially managing multiple sessions.
|
||||
|
||||
Therefore, the platform-independent parts of PuTTY use \e{hardly
|
||||
any} global variables. The very few that do exist, such as
|
||||
\c{flags}, are tolerated because they are not specific to a
|
||||
particular login session: instead, they define properties that are
|
||||
expected to apply equally to \e{all} the sessions run by a single
|
||||
PuTTY process. Any data that is specific to a particular network
|
||||
session is stored in dynamically allocated data structures, and
|
||||
pointers to these structures are passed around between functions.
|
||||
Therefore, the platform-independent parts of PuTTY never use global
|
||||
variables to store per-session data. The global variables that do
|
||||
exist are tolerated because they are not specific to a particular
|
||||
login session: \c{flags} defines properties that are expected to
|
||||
apply equally to \e{all} the sessions run by a single PuTTY process,
|
||||
the random number state in \cw{sshrand.c} and the timer list in
|
||||
\cw{timing.c} serve all sessions equally, and so on. But most data
|
||||
is specific to a particular network session, and is therefore stored
|
||||
in dynamically allocated data structures, and pointers to these
|
||||
structures are passed around between functions.
|
||||
|
||||
Platform-specific code can reverse this decision if it likes. The
|
||||
Windows code, for historical reasons, stores most of its data as
|
||||
global variables. That's OK, because \e{on Windows} we know there is
|
||||
only one session per PuTTY process, so it's safe to do that. But
|
||||
changes to the platform-independent code should avoid introducing
|
||||
any more global variables than already exist.
|
||||
global variables, unless they are genuinely cross-session.
|
||||
|
||||
\H{udp-pure-c} C, not C++
|
||||
|
||||
|
Reference in New Issue
Block a user