fix: close stream adaptive gaps and switch notify to stario v0.1.1
- make stream fast path honor adaptive soft payload limits end-to-end - split oversized fast-stream payloads into sequential frames before batching - use adaptive soft cap when encoding stream batch payloads - move timeout-like error detection into production code for adaptive tx - tune notify FrameReader read size explicitly to avoid throughput regression - drop local stario replace and depend on released b612.me/stario v0.1.1
This commit is contained in:
+13
-1
@@ -1,6 +1,7 @@
|
||||
package notify
|
||||
|
||||
import (
|
||||
"b612.me/stario"
|
||||
"context"
|
||||
"errors"
|
||||
"net"
|
||||
@@ -16,7 +17,7 @@ type TransportConn struct {
|
||||
}
|
||||
|
||||
const (
|
||||
transportStreamReadBufferSize = 256 * 1024
|
||||
transportStreamReadBufferSize = 1024 * 1024
|
||||
transportPacketReadBufferSize = 64 * 1024
|
||||
)
|
||||
|
||||
@@ -28,6 +29,17 @@ func packetReadBuffer() []byte {
|
||||
return make([]byte, transportPacketReadBufferSize)
|
||||
}
|
||||
|
||||
func newTransportFrameReader(conn net.Conn, queue *stario.StarQueue) *stario.FrameReader {
|
||||
reader := stario.NewFrameReader(conn, queue)
|
||||
if reader == nil {
|
||||
return nil
|
||||
}
|
||||
if transportStreamReadBufferSize > stario.DefaultFrameReaderBufferSize {
|
||||
reader.SetReadBufferSize(transportStreamReadBufferSize)
|
||||
}
|
||||
return reader
|
||||
}
|
||||
|
||||
type TransportConnRuntimeSnapshot struct {
|
||||
ClientID string
|
||||
RemoteAddress string
|
||||
|
||||
Reference in New Issue
Block a user