On 01/07/2011 04:45, Tim Judd wrote:
> 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.  

So you meant the client or the server.

> I don't know the intricities of webapps yet in how they run.  

Probably a good idea to read up on that if you're going to build one.

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

Whichever one the code for creating a socket is running on.  When you
create a client socket it still uses a port local to the JVM you're
running the code in.


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

Some confusion here still, it's nothing to do with a webapp and entirely
to do with the location of the code.


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

You want to get into webapps, so you're build an app which has nothing
to do with webapps?


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

Why would you?  What does the servlet container offer that running the
code independantly doesn't?

You're not describing an application which uses the http connectors
provided by Tomcat to operate, you're just using Tomcat as a launch
wrapper for your app.


p



>  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 <ch...@christopherschultz.net>
> To: Tomcat Users List <users@tomcat.apache.org>
> Sent: Thu, June 30, 2011 8:07:55 PM
> Subject: Re: webapps and TCP/UDP listening sockets
> 
> Tim,
> 
> 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 
>> single 
> 
>> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to