Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.188.96.1
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp_probe /
node_modules /
nan /
doc /
Delete
Unzip
Name
Size
Permission
Date
Action
asyncworker.md
5.23
KB
-rw-r--r--
2018-02-22 17:07
buffers.md
2.07
KB
-rw-r--r--
2017-04-05 22:07
callback.md
2.57
KB
-rw-r--r--
2018-02-22 17:07
converters.md
1.9
KB
-rw-r--r--
2017-04-05 22:07
errors.md
7.23
KB
-rw-r--r--
2017-11-06 23:36
json.md
1.9
KB
-rw-r--r--
2017-11-06 23:36
maybe_types.md
21.87
KB
-rw-r--r--
2018-03-16 15:57
methods.md
26.6
KB
-rw-r--r--
2018-08-25 12:11
new.md
4.75
KB
-rw-r--r--
2017-11-06 23:36
node_misc.md
5.57
KB
-rw-r--r--
2018-08-25 12:11
object_wrappers.md
8.03
KB
-rw-r--r--
2018-08-25 12:11
persistent.md
10.63
KB
-rw-r--r--
2018-09-29 08:02
scopes.md
2.31
KB
-rw-r--r--
2017-11-06 23:36
script.md
1.25
KB
-rw-r--r--
2017-11-06 23:36
string_bytes.md
1.86
KB
-rw-r--r--
2017-04-05 22:07
v8_internals.md
7.23
KB
-rw-r--r--
2017-11-15 11:00
v8_misc.md
2.85
KB
-rw-r--r--
2017-11-06 23:36
Save
Rename
## Buffers NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility. - <a href="#api_nan_new_buffer"><b><code>Nan::NewBuffer()</code></b></a> - <a href="#api_nan_copy_buffer"><b><code>Nan::CopyBuffer()</code></b></a> - <a href="#api_nan_free_callback"><b><code>Nan::FreeCallback()</code></b></a> <a name="api_nan_new_buffer"></a> ### Nan::NewBuffer() Allocate a new `node::Buffer` object with the specified size and optional data. Calls `node::Buffer::New()`. Note that when creating a `Buffer` using `Nan::NewBuffer()` and an existing `char*`, it is assumed that the ownership of the pointer is being transferred to the new `Buffer` for management. When a `node::Buffer` instance is garbage collected and a `FreeCallback` has not been specified, `data` will be disposed of via a call to `free()`. You _must not_ free the memory space manually once you have created a `Buffer` in this way. Signature: ```c++ Nan::MaybeLocal<v8::Object> Nan::NewBuffer(uint32_t size) Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char* data, uint32_t size) Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char *data, size_t length, Nan::FreeCallback callback, void *hint) ``` <a name="api_nan_copy_buffer"></a> ### Nan::CopyBuffer() Similar to [`Nan::NewBuffer()`](#api_nan_new_buffer) except that an implicit memcpy will occur within Node. Calls `node::Buffer::Copy()`. Management of the `char*` is left to the user, you should manually free the memory space if necessary as the new `Buffer` will have its own copy. Signature: ```c++ Nan::MaybeLocal<v8::Object> Nan::CopyBuffer(const char *data, uint32_t size) ``` <a name="api_nan_free_callback"></a> ### Nan::FreeCallback() A free callback that can be provided to [`Nan::NewBuffer()`](#api_nan_new_buffer). The supplied callback will be invoked when the `Buffer` undergoes garbage collection. Signature: ```c++ typedef void (*FreeCallback)(char *data, void *hint); ```