override fun acceptInternal()

in core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt [39:51]


        override fun acceptInternal(socket: LocalSocket) {
            if (socket.inputStream.read(buffer) != 16) throw IOException("Unexpected traffic stat length")
            val tx = stat.getLong(0)
            val rx = stat.getLong(8)
            if (current.txTotal != tx) {
                current.txTotal = tx
                dirty = true
            }
            if (current.rxTotal != rx) {
                current.rxTotal = rx
                dirty = true
            }
        }