Browse Source

remove unnecessary interface

Darien Raymond 7 years ago
parent
commit
98e330513d
1 changed files with 4 additions and 6 deletions
  1. 4 6
      transport/internet/connection.go

+ 4 - 6
transport/internet/connection.go

@@ -2,20 +2,18 @@ package internet
 
 
 import (
 import (
 	"net"
 	"net"
+
+	"v2ray.com/core/features/stats"
 )
 )
 
 
 type Connection interface {
 type Connection interface {
 	net.Conn
 	net.Conn
 }
 }
 
 
-type addInt64 interface {
-	Add(int64) int64
-}
-
 type StatCouterConnection struct {
 type StatCouterConnection struct {
 	Connection
 	Connection
-	Uplink   addInt64
-	Downlink addInt64
+	Uplink   stats.Counter
+	Downlink stats.Counter
 }
 }
 
 
 func (c *StatCouterConnection) Read(b []byte) (int, error) {
 func (c *StatCouterConnection) Read(b []byte) (int, error) {