Skip to content

Commit d5d3992

Browse files
authored
Merge branch 'master' into master
2 parents 97255c0 + c79463d commit d5d3992

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sctptransport.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,14 @@ func (r *SCTPTransport) association() *sctp.Association {
430430

431431
return association
432432
}
433+
434+
// BufferedAmount returns total amount (in bytes) of currently buffered user data.
435+
func (r *SCTPTransport) BufferedAmount() int {
436+
r.lock.Lock()
437+
defer r.lock.Unlock()
438+
if r.sctpAssociation == nil {
439+
return 0
440+
}
441+
442+
return r.sctpAssociation.BufferedAmount()
443+
}

0 commit comments

Comments
 (0)