-
Client server Question......Plz help
Ok, so now ive got a server and 2 clients connected to it. On the server, i have data structures that hold the port and IP addresses of the clients and I guess a combination of these two can be used to differentiate the clients.
now these clients are communication with the server. they input numbers, which go to the server and get stored in another datastructure.
THE QUESTION
if client 1 inputs 1, i got to inform client 2 that client 1 has input 1
the server is multithreaded offcourse.
in other words, i want to send a message from one client to another, please help.
note that i have got the clients getInetAddress and port numbers
-
As I earlier pointed, there is an example of how to do that. I wrote an client/server chat application that does all of it. when client a sends a message it notifies the other clients of the new message. my the way: you don't need the ip/port of the clients. usually you have a stable connection between client and server, represented as input and outputstreams. when a client send something to the server, the server can use the outputstream to all other clients to send them that information.
Similar Threads
-
By Eric Harris in forum VB Classic
Replies: 2
Last Post: 04-21-2002, 01:03 PM
-
By Patrick Lauber in forum Open Source
Replies: 0
Last Post: 03-07-2001, 10:52 AM
-
By Sunil in forum ASP.NET
Replies: 0
Last Post: 12-17-2000, 01:02 PM
-
Replies: 7
Last Post: 09-15-2000, 08:44 AM
-
By Sergey in forum Enterprise
Replies: 0
Last Post: 03-24-2000, 06:30 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|