aspose file tools*
The moose likes Beginning Java and the fly likes can a server have more than one port? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can a server have more than one port?" Watch "can a server have more than one port?" New topic
Author

can a server have more than one port?

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
can a server listen on more than one port at a time?

Justin


You down with OOP? Yeah you know me!
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
Yes. A Java process can listen on many ports.

For example, Tomcat supports this by allowing you to define multiple connectors in the server.xml file.
Srinivas Kalvala
Ranch Hand

Joined: Oct 20, 2005
Posts: 257

Hello,

A program can run different threads which will listen on different ports.
But in single thread server can listen to only one port.

FYI:
http://www.iana.org/assignments/port-numbers
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Server is nothing but a program listening at some port..you can write a server which listens at any number of ports.


Rahul Bhattacharjee
LinkedIn - Blog
 
wood burning stoves
 
subject: can a server have more than one port?