This library is under constant development and provides the basic functionality for creating your InSim. If you run into any problems or have any suggestions, please create a new issue.
It is advisable to always use the latest version of Node when possible, this library has been tested with version 16.9.0 and does not guarantee functionality with earlier versions.
$ npm install insim.js
$ yarn add insim.js
To make good use of this library, basic knowledge about InSim is required. You can read in the Live for Speed manual what packages exist and their functionality.
const { InSim, PacketType } = require('insim.js');
const insim = new InSim({
host: '127.0.0.1', // DCon host
port: 29999, // DCon port
name: 'Example 1', // Your InSim name
password: 'adminPassword', // DCon admin password
});
// It's always recommended to handle errors
insim.on('error', (error) => {
console.log('Error', error);
});
// When the InSim connect to DCon (no warranty for operation)
insim.on('connect', () => {
console.log('Connected to DCon');
});
// When InSim receives the data from the DCon
insim.on('ready', () => {
console.log('InSim is ready');
});
insim.connect();
All of InSim's features are not implemented yet, but you can follow the progress by clicking here.
License information can be found in the LICENSE file.