udp 통신 질문입니다.
이건 connection을 만드는 부분이구요..
[code:1]void makeConnection(char* IPAddress)
{
if ((he=gethostbyname(IPAddress)) == NULL) { /* get the host info */
herror("gethostbyname");
exit(1);
}
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
perror("socket");
exit(1);
}
their_addr.sin_family = AF_INET; /* host byte order */
their_addr.sin_port = htons(PORT); /* short, network byte order */