tcp.Conn:add Flush method and more lock protection

This commit is contained in:
Patricio Whittingslow
2026-01-01 10:32:13 -03:00
parent f8166aea05
commit c6e88b1c3b
5 changed files with 85 additions and 29 deletions
+2 -2
View File
@@ -90,8 +90,8 @@ func (rtx *ringTx) Free() int {
return r.Free()
}
// Buffered returns the amount of written but unsent bytes.
func (rtx *ringTx) Buffered() int {
// BufferedUnsent returns the amount of written but unsent bytes.
func (rtx *ringTx) BufferedUnsent() int {
r, _ := rtx.unsentRing()
return r.Buffered()
}