tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: webapps and TCP/UDP listening sockets
Date Fri, 01 Jul 2011 18:34:26 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim,

On 7/1/2011 10:52 AM, Tim Judd wrote:
> I understand you guys are trying to help, but I am disappointed all I'm hearing 
> is "you're doing it wrong" basically.

You're reading it wrong: I was asking "what are you doing?" not telling
you that you are doing it wrong.

> I was hoping a quick answer to know which 
> machine is executing the code which would be the same side that has it bound.

The machine where you launch the program is the machine that executes
the code. That's pretty universal, you just need to understand the code
you're talking about.

In your Citrix example, you run the Citrix client on (let's say) your
home computer, and that code continues to run there pretty much for all
time (until you terminate the program). If that program runs /another/
program remotely and displays the contents, then the remote program has
always been remote and you are just being allowed to interact with it at
a distance.

> Does anyone know which machine will bind?

If you are running a webapp, the servlet container will always bind on
the server and a traditional webapp never binds to anything at all: the
container (Tomcat in this case) handles everything.

If you write a program to call-up a web server and request information,
your client program will bind to whatever machine it runs on (your home
computer perhaps) and the two programs exchange information over the wire.

You can't run a program on one machine that binds to a port on another
machine, at least without some super-special black magic going on.

If you write a web application that creates it's own sockets (which is
what we're saying doesn't make any sense to do, but it's hard to tell
what on earth you're talking about in the first place), they will bind
on the server, never the client.

Does that clear anything up?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4OEzEACgkQ9CaO5/Lv0PBdRwCglxGxEUtNGQyM4e78TyxB4o+x
JuIAnikPTGtj9VyG6CMpIgliu67+VIvp
=aIQI
-----END PGP SIGNATURE-----

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


Mime
View raw message