You create threads by making classes that implement runnable or extend
thread.  Calling .start() on those classes will make the code in the run()
method of those classes execute in a new thread.  So, that code should be
your network connecting code.

Good place to start is java.sun.com, follow the link to the Java Tutorial,
there is a section on threading that walks you through the basics.

Good luck!

On Thu, 8 Jul 1999, Chien-Lung Wu wrote:

> 
> Hi,
> 
> I am doing java networking program. Since my project have a little trick
> architecture, I am planning to use JAVA as my design language.
> 
> The Questions are:
> 1. one of my machine called PS have to connect to 3 different servers (R1,
> R2, and R3) to collect info. So PS have to make connect with R1, R2, and
> R3. I want PS to connect Servers independently, that means, the
> connection is concurrent, not sequence. How can I do that?
> 
> 2. I think PS is a very important part in my project. As I mentioned on 1.
> PS is a client to communicate with 3 servers. However, PS is also a serevr
> to be trigger by Q. How can I deal with this situation? Is JAVA
> multithread can solve my question?
> 
> 
> 
> The configuration I try to solve is as following.
> 
> 
>                        +-<-------------->R1
>                       /               
>       Q<---------> PS-<---------------> R2
>                       \
>                        +---<-----------> R3
> 
> How can I use java multithread to desigm my program, such that PS can
> communicate with R1, R2, and R3 respectly, and PS also can receive Q's
> triger to satisfy Q's request?
> 
> Can anyone give me some hints or guideline to do it? Do anyone can point
> out some material about JAVA multithread and java network programming?
> 
> Any suggestion will be appreciated.
> 
> 
> C. L.
> 
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to