oneshot: accept a TCP connection then hand it off to a function