File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ func (s *Stream) ID() uint32 {
6868// Read implements net.Conn
6969func (s * Stream ) Read (b []byte ) (n int , err error ) {
7070 for {
71- n , err = s .TryRead (b )
71+ n , err = s .tryRead (b )
7272 if err == ErrWouldBlock {
7373 if ew := s .waitRead (); ew != nil {
7474 return 0 , ew
@@ -79,18 +79,8 @@ func (s *Stream) Read(b []byte) (n int, err error) {
7979 }
8080}
8181
82- // PeekSize returns the next size for Read
83- func (s * Stream ) PeekSize () int {
84- s .bufferLock .Lock ()
85- defer s .bufferLock .Unlock ()
86- if len (s .buffers ) > 0 {
87- return len (s .buffers [0 ])
88- }
89- return 0
90- }
91-
92- // TryRead is the nonblocking version of Read
93- func (s * Stream ) TryRead (b []byte ) (n int , err error ) {
82+ // tryRead is the nonblocking version of Read
83+ func (s * Stream ) tryRead (b []byte ) (n int , err error ) {
9484 if s .sess .config .Version == 2 {
9585 return s .tryReadv2 (b )
9686 }
You can’t perform that action at this time.
0 commit comments