pass a callback containing the callbacks to the stream

This commit is contained in:
Marten Seemann 2017-12-18 18:37:37 +07:00
parent 44cff87e53
commit fc8fafd15e
12 changed files with 218 additions and 165 deletions

View file

@ -27,8 +27,8 @@ type cryptoStream struct {
var _ cryptoStreamI = &cryptoStream{}
func newCryptoStream(onData func(), flowController flowcontrol.StreamFlowController, version protocol.VersionNumber) cryptoStreamI {
str := newStream(version.CryptoStreamID(), onData, nil, flowController, version)
func newCryptoStream(sender streamSender, flowController flowcontrol.StreamFlowController, version protocol.VersionNumber) cryptoStreamI {
str := newStream(version.CryptoStreamID(), sender, flowController, version)
return &cryptoStream{str}
}