mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-05 07:06:57 +08:00
优化网络IO使用buffer读取
This commit is contained in:
@@ -17,7 +17,7 @@ type MergeWritingBuffer interface {
|
||||
|
||||
IsFull(ts int64) bool
|
||||
|
||||
IsCompeted() bool
|
||||
IsCompleted() bool
|
||||
|
||||
IsEmpty() bool
|
||||
|
||||
@@ -72,7 +72,7 @@ func (m *mergeWritingBuffer) IsFull(ts int64) bool {
|
||||
return int(ts-m.prePacketTS) >= AppConfig.MergeWriteLatency
|
||||
}
|
||||
|
||||
func (m *mergeWritingBuffer) IsCompeted() bool {
|
||||
func (m *mergeWritingBuffer) IsCompleted() bool {
|
||||
data, _ := m.transStreamBuffer.Data()
|
||||
return m.segmentOffset == len(data)
|
||||
}
|
||||
|
Reference in New Issue
Block a user