Hi,

Why would you want to have servlets listen at a port? Servlets are for a
webserver kind of environment which allows them to handle requests.

Normally applications are the only pieces of code that should listen at a
port. When you listen at a port you create a server socket. Get a socket
from that and spawns threads that will handle that socket. It then continues
listening.


Thanks,
tanmay



-----Original Message-----
From: R�bert P�rhonyi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 31, 2000 8:44 AM
To: [EMAIL PROTECTED]
Subject: sockets and ports


Hi everybody,

I have a servlet (and its running threads) which is listening a specific
portnumber. If a message comes in through this port who will get the
message? All the threads or just one of them and this one should
distribute it to the others?

Thanx for your answer!


regards,
Robert

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to