• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

confusion about ports...

 
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........?





 
Ranch Hand
Posts: 194
  • 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.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • 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
 
expectation is the root of all heartache - shakespeare. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic