move the ApplicationErrorCdoe to the qerr package

This commit is contained in:
Marten Seemann
2021-04-25 18:28:25 +07:00
parent 592fb9cad9
commit f5238bf7b1
18 changed files with 44 additions and 33 deletions

View File

@@ -4,13 +4,14 @@ import (
"bytes"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/qerr"
"github.com/lucas-clemente/quic-go/quicvarint"
)
// A ResetStreamFrame is a RESET_STREAM frame in QUIC
type ResetStreamFrame struct {
StreamID protocol.StreamID
ErrorCode protocol.ApplicationErrorCode
ErrorCode qerr.ApplicationErrorCode
FinalSize protocol.ByteCount
}
@@ -38,7 +39,7 @@ func parseResetStreamFrame(r *bytes.Reader, _ protocol.VersionNumber) (*ResetStr
return &ResetStreamFrame{
StreamID: streamID,
ErrorCode: protocol.ApplicationErrorCode(errorCode),
ErrorCode: qerr.ApplicationErrorCode(errorCode),
FinalSize: byteOffset,
}, nil
}