File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server and Multiclient application

 
Amruta Jegarkal
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on Server and Multiclient application,im not able to send message from one specific client to another specific client.....How to identify message is from which client and how to send to particular client?.....
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean sending messages between clients works in general (after having passed through the server, I assume), just not between a particular set of two clients?
 
Amruta Jegarkal
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya message will be sent via server,server does work of message exchange between clients....
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you done so far to debug the issue? Where does the message get stuck (or vanish) if those two particular clients are involved?
 
Amruta Jegarkal
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I have written code for 1 client and server communication,its working fine.......For multi client i just used multithreading concept by extending Thread and overriding run but what next im not getting........
 
Amruta Jegarkal
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Amruta Jegarkal
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
package com.simpragma.assignment.serverapplication;


 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amruta Jegarkal wrote:


I have written code for 1 client and server communication,its working fine.......For multi client i just used multithreading concept by extending Thread and overriding run but what next im not getting........


What next depends on what you need to do. To send the message to all other clients, you need to:
- Loop over all other clients
- for each client, check to see if it is not the same one who sent the message
- if the client did not send the message to the server, send the message to client.

To send the message to just one other client:
- Identify the client to send to
- Get that client
- Send the message to that client
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic