1 client, 2 servers

This is a discussion on 1 client, 2 servers within the Networking/Device Communication forums, part of the General Programming Boards category; I made a client-server program set, that's server will receive the message client sent. If the server program is in ...

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    1 client, 2 servers

    I made a client-server program set, that's server will receive the message client sent.
    If the server program is in multiple different computers on the same local network, and client opens a connection to the server program, do all server programs in the local network receive the connection and the message?

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The client must specify the end-point of the connection. With any stream-oriented protocol like TCP, this cannot (I think) even be a broadcast. The client must connect to a specific port of a specific IP. There can only be one program ever be listening to the same IP and port.

    Thus, the client will only connect to one server, unless you create more than one connection.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    tcp is one-to-one, or direct connection. servers may share data. this process is independent of tcp.

    Kuphryn

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You might want to look into sending a UDP pack to the broadcast IP which will be recieved by all IPs.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket Programming Problem!!!!
    By bobthebullet990 in forum Networking/Device Communication
    Replies: 2
    Last Post: 02-21-2008, 07:36 PM
  2. WSAAsyncSelect Socket Model. She's Not Hot.
    By Tonto in forum Networking/Device Communication
    Replies: 2
    Last Post: 03-24-2007, 09:34 AM
  3. Client works on a LAN but don't send all the data
    By Niara in forum Networking/Device Communication
    Replies: 9
    Last Post: 01-04-2007, 04:44 PM
  4. Replies: 1
    Last Post: 09-18-2005, 10:06 PM
  5. Server Client Messaging Program
    By X PaYnE X in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-04-2004, 05:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21