When I tried to do a send to, I got the following error:
Address family not supported by protocol
below is part of my code:
Code:
rlen = recvfrom(recv_s,f,sizeof(Frame),0,(struct sockaddr*)&client,&client_len);
if (rlen < 0) {
perror("Error: recv failed");
exit(1);
}
if (sendto(recv_s,ack_f,sizeof(Frame),0,(struct sockaddr *)&client,sizeof(client)) != rlen) {
perror("Error: Sending message failed");
close(recv_s);
close(send_s);
exit(1);
}
basically the client information is filled from the recvfrom... but I don't know why when it tries to send it back it gives that error