Search Result

Collapse
2 results in 0.0040 seconds.
Keywords
Members
Tags
af_inet
  •  

  • Error downloading video streams from metacafe via inet_ntop()

    I've written a program to download the video streamed from different sites to my computer,
    everything works fine with youtube or other sites but when I try to get the IP of Metacafe, inet_ntop() returns NULL.

    this is the code I'm using: (address will be stored in ip)
    Code:
    struct hostent *hent;
    size_t iplen = 15; //XXX.XXX.XXX.XXX
    char *ip = (char *)malloc(iplen+1); //this is our address
    
    memset(ip,
    ...
    See more | Go to post

  • brunoyalgi
    started a topic AF_INET PF_INET difference - socket programming
    in C

    AF_INET PF_INET difference - socket programming

    In socket programming in C++ WIN32 / UNIX / LINUX , we use AF_INET for Address family and PF_NET for protocol family.

    socket( AF_INET, SOCK_STREAM, IPPROTO_IP )
    serv_addr.sin_f amily = AF_INET;

    socket( PF_INET, SOCK_STREAM, IPPROTO_IP )
    serv_addr.sin_f amily = PF_INET;

    I would like to know where we need to use AF_NET & PF_NET respectively?
    See more | Go to post
Working...