mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-12 07:29:04 +08:00
e406de7e00
PUBLISHED_FROM=8b7fcfc1bc32ff9ff38e2904ddb730c83bf9fae4
692 B
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.