Re: About create pipes between server and client.
Mohamed Abdelaziz <[email protected]> Tue, 13 Sep 2005 17:31:47 -0700
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
wrote: > Hi,everyone, I am writing a simple program using pipe. > There are two parts in the program:server and client. And I want to > let them communicate with each other. > The server side should run first, and it also have initiate a pipe to > listen to the client's message. > And then, the client send a message to the server, the server should > get it and return it to the client. > That's all.And I don't know how to initiate the pipe listening to the > client's message.Should I create a unidirection or bidirection pipe? > Could you show me the steps? > And also, when there are many clients, the server should response to > everyone, how can I make the server listen at several port,so the > requests can be response at the same time? > Please give me some simple code.Thank you! There are two tutorials on this (a unidirectional, and a bidirectional). Try both and see what fits your needs http://platform.jxta.org/source/browse/platform/www/java/tutorial/examples/PipeExample/ http://platform.jxta.org/source/browse/platform/www/java/tutorial/examples/pipeserver/ http://blogs.sun.com/roller/page/hamada http://weblogs.java.net/blog/hamada