• Dave Cheney's avatar
    exp/ssh: simplify client channel open logic · bbbd41f4
    Dave Cheney authored
    This is part one of a small set of CL's that aim to resolve
    the outstanding TODOs relating to channel close and blocking
    behavior.
    
    Firstly, the hairy handling of assigning the peersId is now
    done in one place. The cost of this change is the slightly
    paradoxical construction of the partially created clientChan.
    
    Secondly, by creating clientChan.stdin/out/err when the channel
    is opened, the creation of consumers like tcpchan and Session
    is simplified; they just have to wire themselves up to the
    relevant readers/writers.
    
    R=agl, gustav.paul, rsc
    CC=golang-dev
    https://golang.org/cl/5448073
    bbbd41f4
tcpip.go 3.72 KB