rename hostname to host (#74)

This commit is contained in:
u9g 2021-04-23 03:23:43 -04:00 committed by GitHub
commit 39659cf48b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 62 additions and 64 deletions

View file

@ -14,7 +14,7 @@ async function startTest (version = '1.16.220', ok) {
await prepare(version)
const Item = require('../types/Item')(version)
const port = 19130
const server = new Server({ hostname: '0.0.0.0', port, version, offline: true })
const server = new Server({ host: '0.0.0.0', port, version, offline: true })
function getPath (packetPath) {
return DataProvider(server.options.protocolVersion).getPath(packetPath)
@ -108,7 +108,7 @@ async function startTest (version = '1.16.220', ok) {
// client logic
const client = new Client({
hostname: '127.0.0.1',
host: '127.0.0.1',
port,
username: 'Notch',
version,

View file

@ -23,12 +23,12 @@ function proxyTest (version, timeout = 1000 * 20) {
const relay = new Relay({
version,
offline: true,
/* Hostname and port for clients to listen to */
hostname: '0.0.0.0',
/* host and port for clients to listen to */
host: '0.0.0.0',
port: 19132,
/* Where to send upstream packets to */
destination: {
hostname: '127.0.0.1',
host: '127.0.0.1',
port: 19131
}
})
@ -37,7 +37,7 @@ function proxyTest (version, timeout = 1000 * 20) {
console.debug('Proxy started', server.options.version)
const client = createClient({ hostname: '127.0.0.1', version, username: 'Boat', offline: true })
const client = createClient({ host: '127.0.0.1', version, username: 'Boat', offline: true })
console.debug('Client started')

View file

@ -11,7 +11,7 @@ async function test (version) {
console.log('Started server')
const client = new Client({
hostname: '127.0.0.1',
host: '127.0.0.1',
port: 19130,
username: 'Notch',
version,