1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add TRACY_ONLY_LOCALHOST macro to avoid listening on all interfaces.

This commit is contained in:
Graydon Hoare
2020-05-28 22:09:59 -07:00
parent ce0d8d9fb7
commit e76b8ae423
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -393,7 +393,9 @@ bool ListenSocket::Listen( int port, int backlog )
memset( &hints, 0, sizeof( hints ) );
hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_STREAM;
#ifndef TRACY_ONLY_LOCALHOST
hints.ai_flags = AI_PASSIVE;
#endif
char portbuf[32];
sprintf( portbuf, "%i", port );