I'm encountering a strange problem with my program.
I've been using UDP to transfer a file, with the standard sendto and recvfrom.
I have the server and client communicate back and forth many times during the program.
I've just added a new sendto call in the server's code, and it's giving me this error on execution.
Address family not supported by protocol.
and that's coming from my sendto function.
Here is the code it's executing:
if ((numbytes = sendto(sockfd,sDropped,strlen(sDropped), 0,
(struct sockaddr *)&their_addr, p->ai_addrlen)) == -1) {
perror("talker: sendto");
exit(1);
}
As i said, this code works about 4 other times earlier in the program, so I'm sure i've got everything hooked up right.
Is anyone familiar with this issue, and could give me some insights on what to check for in my program that might produce this problem?
Thanks.