diff options
author | 2023-09-21 09:43:08 +0800 | |
---|---|---|
committer | 2023-09-20 18:43:08 -0700 | |
commit | 7319142fd866d8314364d769f401a492892f7d63 (patch) | |
tree | 581466ccd682482f080ad6b8dc41eeb33e2f4626 /src/bun.js/bindings/BunObject.cpp | |
parent | 365fc0d39ddfaed8683eb6ee75013a0fe3adcae2 (diff) | |
download | bun-7319142fd866d8314364d769f401a492892f7d63.tar.gz bun-7319142fd866d8314364d769f401a492892f7d63.tar.zst bun-7319142fd866d8314364d769f401a492892f7d63.zip |
feat(node:dns): implement `dns.lookupService` (#5613)
* feat(node:dns): implement dns.lookupService
Close: #4347
* fix flags
* add `getSockaddr`
* fix sockaddr size
* flaky test
Diffstat (limited to 'src/bun.js/bindings/BunObject.cpp')
-rw-r--r-- | src/bun.js/bindings/BunObject.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bun.js/bindings/BunObject.cpp b/src/bun.js/bindings/BunObject.cpp index 91fc810da..9d8ce6674 100644 --- a/src/bun.js/bindings/BunObject.cpp +++ b/src/bun.js/bindings/BunObject.cpp @@ -215,6 +215,7 @@ extern "C" EncodedJSValue Bun__DNSResolver__resolvePtr(JSGlobalObject*, JSC::Cal extern "C" EncodedJSValue Bun__DNSResolver__resolveCname(JSGlobalObject*, JSC::CallFrame*); extern "C" EncodedJSValue Bun__DNSResolver__getServers(JSGlobalObject*, JSC::CallFrame*); extern "C" EncodedJSValue Bun__DNSResolver__reverse(JSGlobalObject*, JSC::CallFrame*); +extern "C" EncodedJSValue Bun__DNSResolver__lookupService(JSGlobalObject*, JSC::CallFrame*); static JSValue constructDNSObject(VM& vm, JSObject* bunObject) { @@ -246,6 +247,8 @@ static JSValue constructDNSObject(VM& vm, JSObject* bunObject) JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "reverse"_s), 2, Bun__DNSResolver__reverse, ImplementationVisibility::Public, NoIntrinsic, JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); + dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "lookupService"_s), 2, Bun__DNSResolver__lookupService, ImplementationVisibility::Public, NoIntrinsic, + JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); return dnsObject; } |