dimanche 5 avril 2015

Linux socket descriptor


Vote count:

0




I am reading a tutorial on unix domain sockets at this link.


From searching on SO, I find socket descriptor is said to be the same as file descriptor and is said to point to an entry in the file descriptor table.


If this is true, I want to ask, where for an fd that would point to an inode of the file opened, does socket descriptor's entry also contain an inode of the socket file ?


Also in the sample code, after the server accepts a connection:



len = sizeof(struct sockaddr_un);
s2 = accept(s, &remote, &len);


What would s2 point to ?



asked 33 secs ago

Jake

2,855






Linux socket descriptor

Aucun commentaire:

Enregistrer un commentaire