tls: ok, .read(0) is necessary
tls: emit `end` before `close`
WIP