tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Judd <>
Subject Re: webapps and TCP/UDP listening sockets
Date Fri, 01 Jul 2011 03:45:24 GMT
Hi Christopher, all

'machine' was meant to indicate one of two choices, the computer that is running 
the tomcat server, or the computer who is the client in a client-server 
relationship.  I don't know the intricities of webapps yet in how they run.  
This thread was just trying to understand if I'm barking up the wrong tree.

Your second paragraph is better phrased.  which computer/'machine' is doing the 
binding?  Writing a standalone Java desktop app is most definately going to bind 
to it's own machine.  I don't need to delegate anything to Tomcat itself, I need 
to know if I run a webapp and it binds and listens to a socket, which machine 
does it bind on?

Lastly, your statement about making it a webapp if http is not involved is 
because to centrally deploy an application is often served off http; I wanted to 
get into Java/webapps so I elected this route.  If they are standalone protocols 
(and they will be) to communicate between many clients to one (or a farm) of 
servers, why can't I launch it from http?

 If opportunity doesn't knock, build a door.
"I can" is a way of life.
More and Bigger is not always Better.
The road to success is always uphill.

From: Christopher Schultz <>
To: Tomcat Users List <>
Sent: Thu, June 30, 2011 8:07:55 PM
Subject: Re: webapps and TCP/UDP listening sockets

Hash: SHA1


On 6/30/2011 7:14 PM, Tim Judd wrote:
> If I develop a webapp that listens for TCP/UDP sockets, which machine is 
> actually listening?

When you say "machine"... you mean ... what, exactly?

If you develop a webapp that listens for TCP/UDP sockets, where is the
socket bind occurring? If it's your webapp, then it really has nothing
to do with Tomcat at all: it's just like writing a non-webapp program
that binds to a socket and listens.

If you want to delegate incoming requests to threads from Tomcat's
request processor pool, that might be a bit tricky. Is that what you'd
like to do?

Do you really need Tomcat in this situation?

> Is the tomcat server listening (because the webapp is 
> running on that tomcat) or is the client listening (because he is running the 
> webapp on the tomcat server)!

Probably both, but it depends on your answer to the above questions.

> My goal is to have:
>   single UDP listening at tomcat server for packets, and
>   multicast UDP listening at the clients that is getting resended off the 
> above UDP port from the webapp tomcat server

Why do you want to build this as a web-based application if HTTP isn't
really involved?

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message