clent-client communication inc

This is a discussion on clent-client communication inc within the Networking/Device Communication forums, part of the General Programming Boards category; how i can send data from one client to another client. iam know hoew to send data from server to ...

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    90

    clent-client communication inc

    how i can send data from one client to another client.
    iam know hoew to send data from server to client .
    plase help this is just like chating.
    is there any useful links plase give to me
    thank u
    sree.

  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    No difference, really. You just have to move the data the right way:

    1) Client A sends data to Server, Server relays data to Client B. Client A has effectively sent Client B data. (Probably the easiest, but involves data being transferred twice. Example: Chat)

    2) Client A sends Server a request to tell Client B that A wants to connect to B. Server relays the request to B, who then accepts or denies it, and B opens a port for A. Server sends Client A Client B's IP address/port. Client A connects directly to Client B, and data transfer commences. (More complex, involves two connections, possible firewall issues, but data doesn't flow throw a central server, easing load. Example: Filesending in AIM, etc.)
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    if you don't want a main server to do things for you, like Cactus_Hugger suggested in option #2 (btw, he is right), you will need to think a little different;

    Instead of two clients, how about two servers?
    Each "server" will be listening for a connection on a defined open port, let's say 666.
    So once side A will want to talk to side B, he will send packets to port 666 to IP of A, and the other way around. So both sides listen on the same port and send packets to the same port on the other side.

    This will create a pretty flexible stand alone clients, the only problem you might have here, is how will you know what is the IP of each "client/server" machine.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to Send Mac Address From Client to Server
    By Lieyza197 in forum C Programming
    Replies: 2
    Last Post: 05-27-2009, 10:58 AM
  2. Socket Programming Problem!!!!
    By bobthebullet990 in forum Networking/Device Communication
    Replies: 2
    Last Post: 02-21-2008, 07:36 PM
  3. WSAAsyncSelect Socket Model. She's Not Hot.
    By Tonto in forum Networking/Device Communication
    Replies: 2
    Last Post: 03-24-2007, 09:34 AM
  4. 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
  5. Replies: 1
    Last Post: 09-18-2005, 10:06 PM

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