mongoose/docs/c-api/util.h/mg_conn_addr_to_str.md
Dmitry Frank 23122b327c Remove old docs, rename docs_new to docs
It would be probably good idea to also remove tools/docgen.py and
asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which
may contain some useful info which we'll need at least to review before
removing.

PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
2016-05-15 22:07:04 +03:00

692 B

title decl_name symbol_kind signature
mg_conn_addr_to_str() mg_conn_addr_to_str func void mg_conn_addr_to_str(struct mg_connection *nc, char *buf, size_t len, int flags);

Convert connection's local or remote address into string.

The flags parameter is a bit mask that controls the behavior, see MG_SOCK_STRINGIFY_* definitions.

  • MG_SOCK_STRINGIFY_IP - print IP address
  • MG_SOCK_STRINGIFY_PORT - print port number
  • MG_SOCK_STRINGIFY_REMOTE - print remote peer's IP/port, not local address

If both port number and IP address are printed, they are separated by :. If compiled with -DMG_ENABLE_IPV6, IPv6 addresses are supported.