2.1.0 • Published 7 years ago

xonlinetracker-core v2.1.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
7 years ago

XOnlineTracker (Core)

This component is the core of XOnlineTracker which tracks the IP address and the key hash of clients.

Installation

To install this component, type following commands in the terminal:

npm install xonlinetracker-core --save

API

Before using, you should import Trackerclass from the library.

var Tracker = require("xonlinetracker-core").Tracker;

The Tracker class has following methods.

APIDescriptionParameters
clear()Clear saved data.
collect(timeout)Collect expired data.timeout (Integer): Expiry timeout.
query(keyHash)Query addresses mapped to specific key hash.keyHash (String): The hash of the client key.
renew(address, keyHash)Renew an address-key hash pair.address (String): The address of the client. keyHash (String): The hash of the client key.