I was trying to understand what does it mean that accept() creates a new socket and the accepted answer of this question was very helpful. My question comes from the comment section of the accepted answer as I believe it deserves to be a separate question. My understanding is this
(source ip, source port, destination ip, destination port, protocol) defines a socket.
A socket descriptor is an integer that works as an identifier of a socket (source ip, source port, destination ip, destination port, protocol)
Now apart from the question asked I also want to know whether my understanding "different socket descriptors returned by accept() and socket() points to the same socket (source ip, source port, destination ip, destination port, protocol) but represent different state of the same socket (listening state, connected to client state) just like same file can be in read mode/write mode" is correct or not.