1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 19:45:24 +00:00

remove unnecessary interface

This commit is contained in:
Darien Raymond 2018-10-14 08:23:41 +02:00
parent 2fb1258639
commit 98e330513d
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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 Uplink stats.Counter
Downlink addInt64 Downlink stats.Counter
} }
func (c *StatCouterConnection) Read(b []byte) (int, error) { func (c *StatCouterConnection) Read(b []byte) (int, error) {