go.crypto/ssh: move common channel methods into an embedded struct
This CL introduces a new struct, channel to hold common shared
functions.
* add a new channel struct, which is embeded in {client,server}Chan.
* move common methods from {client,server}Chan into channel.
* remove unneeded used of serverConn.lock in serverChan
(transport.writePacket has its own mutex).
* remove filteredConn, introduce conn.
Hello agl@golang.org, gustav.paul@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.crypto
11 years, 12 months ago
(2012-05-01 10:59:32 UTC)
#1
I think this CL is helpful and I'm not sure that it needs to be ...
11 years, 12 months ago
(2012-05-02 17:03:25 UTC)
#2
I think this CL is helpful and I'm not sure that it needs to be split up. I
think it would be ok to land as is. It's not a complete refactoring (I'd still
like to see the client with a ring buffer to solve the problem of its channels
getting too full), but it seems like this is in the right direction.
Thanks for your comments agl. This CL was a quick and dirty search and replace ...
11 years, 12 months ago
(2012-05-02 22:34:51 UTC)
#3
Thanks for your comments agl. This CL was a quick and dirty search and
replace as a proof of concept, rather than trying to review the whole
thing, I'd like to split this CL into two; one for the various
renames, and the second for the actual code changes.
On Thu, May 3, 2012 at 3:03 AM, <agl@golang.org> wrote:
> I think this CL is helpful and I'm not sure that it needs to be split
> up. I think it would be ok to land as is. It's not a complete
> refactoring (I'd still like to see the client with a ring buffer to
> solve the problem of its channels getting too full), but it seems like
> this is in the right direction.
>
> http://codereview.appspot.com/6128059/
Thank you for your comments. http://codereview.appspot.com/6128059/diff/24005/ssh/channel.go File ssh/channel.go (right): http://codereview.appspot.com/6128059/diff/24005/ssh/channel.go#newcode246 ssh/channel.go:246: if err = c.writePacket(packet); ...
11 years, 11 months ago
(2012-05-07 15:20:50 UTC)
#6
re: writePacket and locks. The only place where writePacket is now called holding c.serverConn.lock is ...
11 years, 11 months ago
(2012-05-07 15:30:56 UTC)
#7
re: writePacket and locks. The only place where writePacket is now called
holding c.serverConn.lock is serverChan.AckRequest, and this lock is only
required to publish serverConn.err correctly.
*** Submitted as http://code.google.com/p/go/source/detail?r=540906e566d5&repo=crypto *** go.crypto/ssh: move common channel methods into an embedded struct This ...
11 years, 11 months ago
(2012-05-08 22:20:10 UTC)
#12
Issue 6128059: code review 6128059: go.crypto/ssh: move common channel methods into an embe...
(Closed)
Created 11 years, 12 months ago by dave_cheney.net
Modified 11 years, 11 months ago
Reviewers:
Base URL:
Comments: 8