1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Separate backend_send from backend_sendbuffer.

On a similar theme of separating the query operation from the
attempted change, backend_send() now no longer has the side effect of
returning the current size of the send buffer. Instead, you have to
call backend_sendbuffer() every time you want to know that.
This commit is contained in:
Simon Tatham
2021-09-12 09:52:46 +01:00
parent 82177956da
commit c336643576
15 changed files with 44 additions and 49 deletions

View File

@ -636,9 +636,8 @@ struct BackendVtable {
void (*free) (Backend *be);
/* Pass in a replacement configuration. */
void (*reconfig) (Backend *be, Conf *conf);
/* send() returns the current amount of buffered data. */
size_t (*send) (Backend *be, const char *buf, size_t len);
/* sendbuffer() does the same thing but without attempting a send */
void (*send) (Backend *be, const char *buf, size_t len);
/* sendbuffer() returns the current amount of buffered data */
size_t (*sendbuffer) (Backend *be);
void (*size) (Backend *be, int width, int height);
void (*special) (Backend *be, SessionSpecialCode code, int arg);
@ -687,8 +686,8 @@ static inline void backend_free(Backend *be)
{ be->vt->free(be); }
static inline void backend_reconfig(Backend *be, Conf *conf)
{ be->vt->reconfig(be, conf); }
static inline size_t backend_send(Backend *be, const char *buf, size_t len)
{ return be->vt->send(be, buf, len); }
static inline void backend_send(Backend *be, const char *buf, size_t len)
{ be->vt->send(be, buf, len); }
static inline size_t backend_sendbuffer(Backend *be)
{ return be->vt->sendbuffer(be); }
static inline void backend_size(Backend *be, int width, int height)