How can TCP/IP identify the correct socket when we bind for 2 different protocols on the same port -


researching , asking of course here found out did not know/realize before.
process can bind specific port 2 different protocols.
e.g. same port x tcp , udp. (any other well-known examples?)
how possible?
mean if new datagramsocket(6789); , new serversocket(6789);
assume can accept both tcp , udp in program , delegate different classes. right?
how work? java understand if client using tcp or udp , passes socket appropriate class?

ports exist within namespace of protocol. isn't same port, same port number.

java has nothing todo either.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -