What's new in Libogc 1.7.1 February 27, 2009 09:30PM | Registered: 16 years ago Posts: 93 |
Re: What's new in Libogc 1.7.1 February 27, 2009 09:45PM | Registered: 15 years ago Posts: 703 |
Re: What's new in Libogc 1.7.1 February 27, 2009 10:16PM | Registered: 16 years ago Posts: 93 |
bzero((char *)&sin,sizeof(sin)); /* clear sin struct */ sin.sin_family = AF_INET; host2addr(&myip, &sin.sin_addr,&sin.sin_family); /* host */ sin.sin_port = htons(9); /* port */ if ((sd=net_socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP)) < 0) { fprintf(stderr,"Can't get socket.\n %d", sd); exit(1); } optval = 1; if (net_setsockopt(sd,SOL_SOCKET, SO_BROADCAST,&optval,sizeof(optval)) < 0) { fprintf(stderr,"Can't set sockopt (%d).\n",errno); exit(1);
Re: What's new in Libogc 1.7.1 February 27, 2009 10:30PM | Admin Registered: 16 years ago Posts: 5,132 |