simplify the connection, rename it to sendConn

This commit is contained in:
Marten Seemann 2020-08-09 19:04:08 +07:00
parent d7c2169c55
commit 89417ab5ca
16 changed files with 175 additions and 246 deletions

View file

@ -74,7 +74,7 @@ type baseServer struct {
// set as a member, so they can be set in the tests
newSession func(
connection,
sendConn,
sessionRunner,
protocol.ConnectionID, /* original dest connection ID */
*protocol.ConnectionID, /* retry src connection ID */
@ -471,7 +471,7 @@ func (s *baseServer) createNewSession(
tracer = s.config.Tracer.TracerForConnection(protocol.PerspectiveServer, connID)
}
sess = s.newSession(
&conn{pconn: s.conn, currentAddr: remoteAddr},
newSendConn(s.conn, remoteAddr),
s.sessionHandler,
origDestConnID,
retrySrcConnID,