mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-02 03:17:37 +03:00
udpnat2: Add cache funcs
This commit is contained in:
parent
fdca9b3f8e
commit
30fbafd954
1 changed files with 14 additions and 0 deletions
|
@ -98,6 +98,20 @@ func (s *Service) NewPacket(bufferSlices [][]byte, source M.Socksaddr, destinati
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Service) Purge() {
|
||||
s.cache.Purge()
|
||||
}
|
||||
|
||||
func (s *Service) PurgeExpired() {
|
||||
s.cache.PurgeExpired()
|
||||
}
|
||||
|
||||
func (s *Service) Metrics() Metrics {
|
||||
return s.metrics
|
||||
}
|
||||
|
||||
func (s *Service) ResetMetrics() Metrics {
|
||||
metrics := s.metrics
|
||||
s.metrics = Metrics{}
|
||||
return metrics
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue