Selective repeat
if next available seq # in window, send pkt
resend pkt n, restart timer
ACK(n) in [sendbase,sendbase+N]:
if n smallest unACKed pkt, advance window base to next unACKed seq #
pkt n in [rcvbase, rcvbase+N-1]
- in-order: deliver (also deliver buffered, in-order pkts), advance window to next not-yet-received pkt
pkt n in [rcvbase-N,rcvbase-1]