0

i am just try to implement the tutorial from here but i have problem in -(void)netServiceDidResolveAddress:(NSNetService *)service {} this method enter image description here how can i remove these error plz help me out.

Thanks in advance.

freelancer
  • 1,658
  • 1
  • 16
  • 37

1 Answers1

0

Have you added

#include <arpa/inet.h>
#include <netinet/in.h>

struct sockaddr_in is declared in netinet/in.h

struct sockaddr_in {
   u_char   sin_len;
   u_char   sin_family;
   u_short  sin_port;
   struct   in_addr sin_addr;
   char sin_zero[8];
};

and inet_ntoa as

char    *inet_ntoa __P((struct in_addr)); /* in libkern */
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167