aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/JSSocketAddress.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/JSSocketAddress.h')
-rw-r--r--src/bun.js/bindings/JSSocketAddress.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bun.js/bindings/JSSocketAddress.h b/src/bun.js/bindings/JSSocketAddress.h
new file mode 100644
index 000000000..5e374dac3
--- /dev/null
+++ b/src/bun.js/bindings/JSSocketAddress.h
@@ -0,0 +1,19 @@
+// The object returned by Bun.serve's .requestIP()
+#pragma once
+#include "root.h"
+#include "JavaScriptCore/JSObjectInlines.h"
+
+using namespace JSC;
+
+namespace Bun {
+namespace JSSocketAddress {
+
+static const NeverDestroyed<String> IPv4 = MAKE_STATIC_STRING_IMPL("IPv4");
+static const NeverDestroyed<String> IPv6 = MAKE_STATIC_STRING_IMPL("IPv6");
+
+Structure* createStructure(VM& vm, JSGlobalObject* globalObject);
+
+} // namespace JSSocketAddress
+} // namespace Bun
+
+extern "C" JSObject* JSSocketAddress__create(JSGlobalObject* globalObject, JSString* value, int port, bool isIPv6);