S
S
Svyatoslav Khusamov2016-07-21 19:20:14
Node.js
Svyatoslav Khusamov, 2016-07-21 19:20:14

Why does the server.address() method return two colons in the address field instead of the IP address?

Why does the server.address() method
https://nodejs.org/dist/latest-v6.x/docs/api/net.h... output
two colons instead of an IP address in the address field? Or two colons is localhost on an IPv6 system?
server.address().address // == "::"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2016-07-21
@khusamov

Два двоеточия в IPv6 - это аналог 0.0.0.0 в IPv4
Означает, что сервер слушает на всех сетевых интерфейсах, а не на определённом.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question