mirror of
https://github.com/parnic/node-intellicenter.git
synced 2025-06-16 18:20:14 -05:00
Use existing variable for request type
This commit is contained in:
4
dist/dns.d.ts
vendored
4
dist/dns.d.ts
vendored
@ -1,3 +1,7 @@
|
||||
export declare const TypeTxt = 16;
|
||||
export declare const TypePtr = 12;
|
||||
export declare const TypeSrv = 33;
|
||||
export declare const TypeA = 1;
|
||||
export declare class Question {
|
||||
name: string;
|
||||
type: number;
|
||||
|
8
dist/dns.js
vendored
8
dist/dns.js
vendored
@ -1,7 +1,7 @@
|
||||
const TypeTxt = 16;
|
||||
const TypePtr = 12;
|
||||
const TypeSrv = 33;
|
||||
const TypeA = 1;
|
||||
export const TypeTxt = 16;
|
||||
export const TypePtr = 12;
|
||||
export const TypeSrv = 33;
|
||||
export const TypeA = 1;
|
||||
export class Question {
|
||||
name = "";
|
||||
type = 0;
|
||||
|
2
dist/dns.js.map
vendored
2
dist/dns.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/finder.js
vendored
4
dist/finder.js
vendored
@ -3,7 +3,7 @@
|
||||
import { createSocket } from "dgram";
|
||||
import { EventEmitter } from "events";
|
||||
import debug from "debug";
|
||||
import { ARecord, GetDNSAnswer, GetDNSQuestion, ipToString, PtrRecord, SrvRecord, } from "./dns.js";
|
||||
import { ARecord, GetDNSAnswer, GetDNSQuestion, ipToString, PtrRecord, SrvRecord, TypePtr, } from "./dns.js";
|
||||
const debugFind = debug("ic:find");
|
||||
export class UnitInfo {
|
||||
name;
|
||||
@ -39,7 +39,7 @@ export class FindUnits extends EventEmitter {
|
||||
offset = this.message.writeUInt8("local".length, offset);
|
||||
offset += this.message.write("local", offset);
|
||||
offset = this.message.writeUInt8(0, offset); // no more strings
|
||||
offset = this.message.writeUInt16BE(0x000c, offset); // type: ptr
|
||||
offset = this.message.writeUInt16BE(TypePtr, offset); // type
|
||||
this.message.writeUInt16BE(1, offset); // class: IN
|
||||
this.finder = createSocket("udp4");
|
||||
this.finder
|
||||
|
2
dist/finder.js.map
vendored
2
dist/finder.js.map
vendored
File diff suppressed because one or more lines are too long
8
dns.ts
8
dns.ts
@ -1,7 +1,7 @@
|
||||
const TypeTxt = 16;
|
||||
const TypePtr = 12;
|
||||
const TypeSrv = 33;
|
||||
const TypeA = 1;
|
||||
export const TypeTxt = 16;
|
||||
export const TypePtr = 12;
|
||||
export const TypeSrv = 33;
|
||||
export const TypeA = 1;
|
||||
|
||||
export class Question {
|
||||
public name = "";
|
||||
|
@ -12,6 +12,7 @@ import {
|
||||
PtrRecord,
|
||||
Record,
|
||||
SrvRecord,
|
||||
TypePtr,
|
||||
} from "./dns.js";
|
||||
|
||||
const debugFind = debug("ic:find");
|
||||
@ -59,7 +60,7 @@ export class FindUnits extends EventEmitter {
|
||||
offset = this.message.writeUInt8("local".length, offset);
|
||||
offset += this.message.write("local", offset);
|
||||
offset = this.message.writeUInt8(0, offset); // no more strings
|
||||
offset = this.message.writeUInt16BE(0x000c, offset); // type: ptr
|
||||
offset = this.message.writeUInt16BE(TypePtr, offset); // type
|
||||
this.message.writeUInt16BE(1, offset); // class: IN
|
||||
|
||||
this.finder = createSocket("udp4");
|
||||
|
Reference in New Issue
Block a user