UNPKG
@luminati-io/raw-socket
Version:
latest (1.7.0-lum.1)
1.7.0-lum.1
Raw sockets for Node.js.
github.com/nospaceships/node-raw-socket
nospaceships/node-raw-socket
@luminati-io/raw-socket
/
example
/
htons.js
12 lines
(7 loc)
•
208 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
var
raw =
require
(
"../"
);
if
(process.
argv
.
length
<
3
) {
console
.
log
(
"node htons <unit16>"
); process.
exit
(-
1
); }
var
uint16 =
parseInt
(process.
argv
[
2
]);
console
.
log
(raw.
htons
(uint16));