aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/JSSocketAddress.h
blob: 5e374dac3d6acf8eb76070c4b3470145bbea6454 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);