src/net/flush.bend checks
raw source on the hub · import 0x9e6d2577f67543fbccdbfe8fd1789f27/src/net/flush.bend as Flush
3 imports
import Base import ../lib/u64.bend as U import ./limits.bend as N
Types
type Facts source · line 28 · raw
Data
Facts@err:Bool -> @over:Bool -> @pending:0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64 -> @total:0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64 -> @idle:0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64 -> @closing:Bool -> @overdue:Bool -> @shut:Bool -> Facts
type Act source · line 31 · raw
Data
FReset@quiet:Bool -> Act
FClosedAct
FShutAct
FBlockAct
FUnblockAct
FEndAct
FWaitAct
type Close source · line 90 · raw
Data
What a close the NAT asks for does (V.TcpClose): with nothing pending the socket closes now; with data pending it lingers (sends it, up to the linger time) unless the most closes already linger, when it resets.
CNowClose
CLingerClose
CResetClose
Definitions
def Flush.half source · line 40 · raw
@+a:0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64 -> 0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64
def Flush.drained source · line 43 · raw
@+f:Facts -> @+blocked:Bool -> Act
def Flush.pressure source · line 48 · raw
@+f:Facts -> @+blocked:Bool -> @l:0x9e6d2577f67543fbccdbfe8fd1789f27/src/net/limits.Limits -> Act
def Flush.fatal source · line 56 · raw
@+f:Facts -> @l:0x9e6d2577f67543fbccdbfe8fd1789f27/src/net/limits.Limits -> Bool
def Flush.closing source · line 62 · raw
@f:Facts -> Bool
def Flush.pending source · line 67 · raw
@f:Facts -> 0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64
def Flush.decide source · line 74 · raw
@+f:Facts -> @+blocked:Bool -> @+l:0x9e6d2577f67543fbccdbfe8fd1789f27/src/net/limits.Limits -> Act
What the flusher does on waking with facts f, the guest blocked or not, under the limits l.
def Flush.over source · line 82 · raw
@+pending:0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64 -> @+total:0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64 -> @l:0x9e6d2577f67543fbccdbfe8fd1789f27/src/net/limits.Limits -> Bool
A send the host queued past the limits: its connection's pending bytes over the hard limit (the guest sent on although it was blocked), or all connections' pending bytes over the wall. The host then drops what the connection holds and its flusher resets it (Facts.over).
def Flush.close source · line 95 · raw
@+pending:Bool -> @+lingering:U32 -> @l:0x9e6d2577f67543fbccdbfe8fd1789f27/src/net/limits.Limits -> Close
def Flush.close.code source · line 100 · raw
@c:Close -> U32
def Flush.word source · line 112 · raw
@+ws:List<&2, U32> -> @k:Nat -> U32
The facts as the host answers them (Hvf.tcp_flush): [err, over, pending, total, idle (each hi, lo), closing, overdue, shut]; None for [] (the socket is gone) or a malformed answer.
def Flush.u64 source · line 115 · raw
@+ws:List<&2, U32> -> @+k:Nat -> 0x9e6d2577f67543fbccdbfe8fd1789f27/src/lib/u64.U64
def Flush.flag source · line 118 · raw
@+ws:List<&2, U32> -> @k:Nat -> Bool
def Flush.facts source · line 121 · raw
@+ws:List<&2, U32> -> Maybe<&2, Facts>