Next grabs the next chunk of data from the Stream and returns it decrypted inside a LockedBuffer. Any error from the stream is forwarded.
()
| 127 | |
| 128 | // Next grabs the next chunk of data from the Stream and returns it decrypted inside a LockedBuffer. Any error from the stream is forwarded. |
| 129 | func (s *Stream) Next() (*LockedBuffer, error) { |
| 130 | s.Lock() |
| 131 | defer s.Unlock() |
| 132 | |
| 133 | return s.next() |
| 134 | } |
| 135 | |
| 136 | // does not acquire mutex lock |
| 137 | func (s *Stream) next() (*LockedBuffer, error) { |