PDA

View Full Version : Java Newbie Network Questions


Zap!
11-19-2002, 12:21 PM
I need a bit of help with explanation with the java.net package. I have been doing a good amount of reading about it with the two books that I have on Java, but I just wanted to verify what I am currently assuming is correct. Here's what I figured.

A server picks the port number. A client can connect to that port, creating a data stream to communicate through.

Now, I guess that I can open up multiple connections through the same port, right? And how would I go about this?

I would like to make it so that I can make multiple clients connect to my server running atop of my MySQL server. Or, would it be easier/better/possible to just let the clients connect directly to the MySQL server though a network?

_underdog
11-19-2002, 04:10 PM
If what you are trying to do is communicate with a mySql server then I think you would want to have your program use JDBC to communicate with the database instead.

Zap!
11-19-2002, 04:27 PM
Yes, I do plan to use the JDBC to communicate with them, but I just wanted to know if it was feasable to use the java.net package to do networked communication.

inkedmn
11-19-2002, 04:51 PM
yeah, i think it'd be a bad idea to let the client connect directly to the sql server. should have at least one "layer" seperating the two, IMO

[edit]

this thread was on my screen for about an hour before i replied to it :)

sorry