HasPendingTx reports whether DrainTx would emit at least one frame.
()
| 212 | |
| 213 | // HasPendingTx reports whether DrainTx would emit at least one frame. |
| 214 | func (s *Session) HasPendingTx() bool { |
| 215 | s.mu.Lock() |
| 216 | defer s.mu.Unlock() |
| 217 | return s.synNeeded || len(s.txBuf) > 0 || (s.closeReq && !s.finSent) |
| 218 | } |
| 219 | |
| 220 | // HasPendingSYN reports whether the next drain will emit a SYN frame. |
| 221 | // Used by the carrier to prioritise new-connection setup over ongoing data |
no outgoing calls