Client server Question......Plz help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Client server Question......Plz help

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    12

    Exclamation 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

  2. #2
    Join Date
    Feb 2006
    Location
    Cologne - Germany
    Posts
    271
    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

  1. SQL Server 2000 and Visual Basic Question
    By Eric Harris in forum VB Classic
    Replies: 2
    Last Post: 04-21-2002, 02:03 PM
  2. develpers needed for a revolutionary p2p network client
    By Patrick Lauber in forum Open Source
    Replies: 0
    Last Post: 03-07-2001, 11:52 AM
  3. Replies: 0
    Last Post: 12-17-2000, 02:02 PM
  4. Replies: 7
    Last Post: 09-15-2000, 09:44 AM
  5. Re: Disconnected RS - Client Question
    By Sergey in forum Enterprise
    Replies: 0
    Last Post: 03-24-2000, 07: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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center