INADDR_ANY not wokring
INADDR_ANY not wokring
- Subject: INADDR_ANY not wokring
- From: Kenneth Perry Hough <email@hidden>
- Date: Tue, 20 May 2008 20:22:58 -0400
Hi,
I am definitely missing something obvious but I just can't figure it out. I'm sorry if it's a simple answer, and I'm pretty sure it is, but when I use INADDR_ANY to get my local address I get 0.0.0.0 instead of what my ip address is on en0 or en1, depending on the interface I am using. I'm used to Linux/Unix programming and I'm pretty sure there isn't much of a difference for MacOS X is UNIX based, but I may be missing something. The following is the snippet of my code:
host.sin_family = AF_INET; host.sin_port = port; host.sin_addr.s_addr = INADDR_ANY; memset(&host.sin_zero , '\0', sizeof(host.sin_zero));
Thanks in advance, Kenneth |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden