UNPKG

diffusion

Version:

Diffusion JavaScript client

43 lines (42 loc) 1.43 kB
/** * Details relating to the network and geographic location of a client session. * * @class ClientLocation * @property {String} address - the IP address of the client * @property {String} hostname - the host name * @property {String} resolved - the resolved name * @property {Object} details - the country details * @property {String} details.country - the country code for the country where the IP address was allocated * @property {String} details.language - the country code for the official language of the country where the IP address * was allocated * @property {Object} coordinates - the geographic coordinates of the client if this could be ascertained * @property {Number} coordinates.latitude - the latitude * @property {Number} coordinates.longitude - the longitude * @property {diffusion.clients.AddressType} type - the address type */ /** * Enum containing possible Address types. * * @readonly * @enum * @memberOf diffusion.clients * @alias AddressType */ module.exports.AddressType = { /** * The address is a standard global internet address */ GLOBAL : 1, /** * The address is a site local address. The address is part of the IP subset that is reserved for private networks. */ LOCAL : 2, /** * The address is assigned to the server loopback interface */ LOOPBACK : 3, /** * The address type is unknown */ UNKNOWN : 4 };