mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2: make has_buffered_out check nwsi
This commit is contained in:
parent
d075d4f9ca
commit
005e130393
2 changed files with 20 additions and 2 deletions
|
@ -1117,8 +1117,8 @@ lws_rxflow_cache(struct lws *wsi, unsigned char *buf, size_t n, size_t len);
|
|||
int
|
||||
lws_service_flag_pending(struct lws_context *context, int tsi);
|
||||
|
||||
static LWS_INLINE int
|
||||
lws_has_buffered_out(struct lws *wsi) { return !!wsi->buflist_out; }
|
||||
int
|
||||
lws_has_buffered_out(struct lws *wsi);
|
||||
|
||||
int LWS_WARN_UNUSED_RESULT
|
||||
lws_ws_client_rx_sm(struct lws *wsi, unsigned char c);
|
||||
|
|
|
@ -622,6 +622,24 @@ lws_get_ssl(struct lws *wsi)
|
|||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
lws_has_buffered_out(struct lws *wsi)
|
||||
{
|
||||
if (wsi->buflist_out)
|
||||
return 1;
|
||||
|
||||
#if defined(LWS_ROLE_H2)
|
||||
{
|
||||
struct lws *nwsi = lws_get_network_wsi(wsi);
|
||||
|
||||
if (nwsi->buflist_out)
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
lws_partial_buffered(struct lws *wsi)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue