mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 08:44:01 +03:00
Add new stats metric
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package wrappers
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/9seconds/mtg/conntypes"
|
||||
)
|
||||
|
||||
func NewClientConn(parent net.Conn, connID conntypes.ConnID) conntypes.StreamReadWriteCloser {
|
||||
conn := newConn(parent, connID, connPurposeClient)
|
||||
conn = NewTrafficStats(conn)
|
||||
|
||||
return conn
|
||||
}
|
||||
|
||||
func NewTelegramConn(dc conntypes.DC, parent net.Conn) conntypes.StreamReadWriteCloser {
|
||||
conn := newConn(parent, conntypes.ConnID{}, connPurposeTelegram)
|
||||
conn = NewTelegramStats(dc, conn)
|
||||
|
||||
return conn
|
||||
}
|
||||
Reference in New Issue
Block a user