what is socket file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    what is socket file

    what is .sock file?
    how to create it?
    how to use it in socket programming?
  • rezamirani
    New Member
    • Aug 2007
    • 6

    #2
    Originally posted by ashitpro
    what is .sock file?
    how to create it?
    how to use it in socket programming?
    Dear Mr,

    If you want I can give you more examples.

    Bests.

    Comment

    • vinot85
      New Member
      • Aug 2007
      • 53

      #3
      You can create a socket file using socket() system call avialable under <sys/socket.h>
      example,
      int sockfd = socket(AF_INET, SOCK_STREAM, 0);
      You can refer to this socket file using the sockfd .
      This is same as the file descriptor, and you can use read(), write() system calls to read and write from the socket

      Comment

      Working...