inet_ntoa 陷阱
摘要:前天同事问我一个关于ip被"替换"的问题,代码大概如下:ip_ local = networkMgr.GetLocalIP(); //127.0.0.1ip_ server = networkMgr.GetServerIP(); //0.0.0.0printf(" l:%s",inet_ntoa(local));printf(" s:%s \n",inet_ntoa(server));//network manager to do somethingprintf(" l:%s s:%s \n",inet_ntoa(
阅读全文
posted @ 2013-03-14 10:16