mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
rename stream.AddStreamFrame to stream.HandleStreamFrame
This commit is contained in:
parent
975e45d2e1
commit
823098d6e2
6 changed files with 53 additions and 53 deletions
|
@ -17,7 +17,7 @@ import (
|
|||
type streamI interface {
|
||||
Stream
|
||||
|
||||
AddStreamFrame(*wire.StreamFrame) error
|
||||
HandleStreamFrame(*wire.StreamFrame) error
|
||||
RegisterRemoteError(error, protocol.ByteCount) error
|
||||
PopStreamFrame(maxBytes protocol.ByteCount) *wire.StreamFrame
|
||||
Finished() bool
|
||||
|
@ -327,8 +327,8 @@ func (s *stream) shouldSendReset() bool {
|
|||
return (s.resetLocally.Get() || s.resetRemotely.Get()) && !s.finishedWriteAndSentFin()
|
||||
}
|
||||
|
||||
// AddStreamFrame adds a new stream frame
|
||||
func (s *stream) AddStreamFrame(frame *wire.StreamFrame) error {
|
||||
// HandleStreamFrame adds a new stream frame
|
||||
func (s *stream) HandleStreamFrame(frame *wire.StreamFrame) error {
|
||||
maxOffset := frame.Offset + frame.DataLen()
|
||||
if err := s.flowController.UpdateHighestReceived(maxOffset, frame.FinBit); err != nil {
|
||||
return err
|
||||
|
@ -390,7 +390,7 @@ func (s *stream) SetDeadline(t time.Time) error {
|
|||
|
||||
// CloseRemote makes the stream receive a "virtual" FIN stream frame at a given offset
|
||||
func (s *stream) CloseRemote(offset protocol.ByteCount) {
|
||||
s.AddStreamFrame(&wire.StreamFrame{FinBit: true, Offset: offset})
|
||||
s.HandleStreamFrame(&wire.StreamFrame{FinBit: true, Offset: offset})
|
||||
}
|
||||
|
||||
// Cancel is called by session to indicate that an error occurred
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue