Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

how can a server socket send a reply to a group of clients..?

hello,

i'm new to sever/client programming.. and i have to do a small assignment in the lab..
i have sent a message from client to server and server have been replyed using socket/serversocket classes.
how can i let the server to reply for a group of machines not only who sent the message..

i'll be thankable if you write me examples of methods and classes i can use..

0
moayyad
Asked:
moayyad
2 Solutions
 
CEHJCommented:
0
 
objectsCommented:
Kepp a list of connected client, and when you recieve a message loop thru the list sending message to each client

see the broadcast() method in the following article for an example

http://www.javaworld.com/javaworld/jw-01-1997/jw-01-chat-p2.html
0
 
moayyadAuthor Commented:
thanx for answer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now