]> Cypherpunks repositories - gostls13.git/commit
exp/ssh: simplify client channel open logic
authorDave Cheney <dave@cheney.net>
Tue, 6 Dec 2011 14:33:23 +0000 (09:33 -0500)
committerAdam Langley <agl@golang.org>
Tue, 6 Dec 2011 14:33:23 +0000 (09:33 -0500)
commitbbbd41f4fff790e9a340a4be77c3c05f37491273
tree0b9838b67b35a3fcffa70cccf5a1ac8137a078c3
parent0a5508c69238e9f68faff2747a1abe9cbdb10dd6
exp/ssh: simplify client channel open logic

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
src/pkg/exp/ssh/client.go
src/pkg/exp/ssh/session.go
src/pkg/exp/ssh/tcpip.go