>> Oh, great. So there's more than one kind? <<
Each connected socket has a source ip address and a source port as well as a destination ip address and destination port. These four bits of information are used by the socket provider to associate a packet with a connection.
Typically, the socket provider automatically selects the source ip address (most computers only have one ip address) and source port when you call connect(). This means that the source port and ip address is usually totally transparent to your program. You can retrieve the source ip address and port after a socket is connected using getsockname().
You can also specify the source port and ip address of a socket before you call connect() with a call to bind(). However, due to the possibility of conflicts this is strongly discouraged:
You can view source and destination information for current connections using the console command netstat -n. For example, this printout shows three connections from my computer to a website (actually a random ip address):
Originally Posted by MSDN
Note the different source ports. All other things being equal (source address, destination address, destination port), the socket provider uses the source port to differentiate between these connections.
Proto Local Address Foreign Address State
TCP 192.168.0.55:2824 18.104.22.168:80 ESTABLISHED
TCP 192.168.0.55:2825 22.214.171.124:80 ESTABLISHED
TCP 192.168.0.55:2826 126.96.36.199:80 ESTABLISHED
When one refers to a port, in relation to sockets, they are usually, but not always, referring to the destination port. Hence the confusion.