FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/src/node_vars.cc at master · lazyprogrammer/node · GitHub
lazyprogrammer
/
node
Public
forked from
nodejs/node-v0.x-archive
Notifications
You must be signed in to change notification settings
Fork
1
Star
4
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
src
/
node_vars.cc
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (39 loc) · 902 Bytes
Breadcrumbs
node
/
src
/
node_vars.cc
Copy path
File metadata and controls
48 lines (39 loc) · 902 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#
include
<
node_vars.h
>
#
include
<
node_isolate.h
>
#
if
HAVE_OPENSSL
#
include
<
node_crypto.h
>
#
endif
#
include
<
string.h
>
namespace
node
{
//
For now we just statically initialize the globals structure. Later there
//
will be one struct globals for each isolate.
void
globals_init
(
struct
globals
* g) {
memset
(g,
0
,
sizeof
(
struct
globals
));
#
ifdef
OPENSSL_NPN_NEGOTIATED
g->
use_npn
=
true
;
#
else
g->
use_npn
=
false
;
#
endif
#
ifdef
SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
g->
use_sni
=
true
;
#
else
g->
use_sni
=
false
;
#
endif
}
#
if
HAVE_ISOLATES
struct
globals
*
globals_get
() {
node::Isolate* isolate =
node::Isolate::GetCurrent
();
return
isolate->
Globals
();
}
#
else
static
struct
globals
g_struct;
static
struct
globals
* g_ptr;
struct
globals
*
globals_get
() {
if
(!g_ptr) {
g_ptr = &g_struct;
globals_init
(g_ptr);
}
return
g_ptr;
}
#
endif
//
HAVE_ISOLATES
}
//
namespace node
Back
|
FazBrowse Home
|
New Git URL