mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
Update On Wed Nov 26 19:35:55 CET 2025
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/enfein/mieru/v3/pkg/appctl/appctlpb"
|
||||
@@ -52,6 +53,9 @@ type baseUnderlay struct {
|
||||
sendMutex sync.Mutex // protect writing data to the connection
|
||||
closeMutex sync.Mutex // protect closing the connection
|
||||
|
||||
inBytes atomic.Int64
|
||||
outBytes atomic.Int64
|
||||
|
||||
// ---- client fields ----
|
||||
scheduler *ScheduleController
|
||||
}
|
||||
@@ -193,6 +197,14 @@ func (b *baseUnderlay) SessionInfos() []*appctlpb.SessionInfo {
|
||||
return res
|
||||
}
|
||||
|
||||
func (b *baseUnderlay) InBytes() int64 {
|
||||
return b.inBytes.Load()
|
||||
}
|
||||
|
||||
func (b *baseUnderlay) OutBytes() int64 {
|
||||
return b.outBytes.Load()
|
||||
}
|
||||
|
||||
func (b *baseUnderlay) RunEventLoop(ctx context.Context) error {
|
||||
return stderror.ErrUnsupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user