• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confusion about ports...

 
karthick chinnathambi
Ranch Hand
Posts: 196
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a port is used to identify a specific software program on the server....


does that mean each and every web-application needs to be deployed in a separate port?

what is a socket for?

what's the exact difference between a socket and a port........?





 
Ryan Beckett
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Network Port number specifies an area in memory (or "endpoint") that your network interface sends incoming data to. Sometimes I think it's easier to imagine it from a networking perspective. An application can listen on multiple ports. Your application (using a ServerSocket for instance) will look there for data sent over the network to be processed. Only applications using TCP/IP communication use ports. A Network Socket is a "channel" that is the flow of data to a specific thread or process, whereas a port can be a data source for multiple sockets. A socket depends on an IP address and port. For instance, you could be running Tomcat on port 8080 and create a Java Server app listening on port 8080 as well. Sun has a networking tutorial.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Karthick!

Maybe it would have been more proper if this question was asked in the Sockets and Internet Protocols forum. Remember to carefully choose one forum before asking a question!
 
karthick chinnathambi
Ranch Hand
Posts: 196
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
friends i am reading the first chapter in Head First servlets.....

i came through these terms........
i always had confusion on these terms....

as i am preparing for SCWCD i posted here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic