Results 1 to 6 of 6

Thread: How can I make a P2P application?

  1. #1
    autofish is offline Registered User
    Join Date
    Apr 2006
    Posts
    4

    Smile How can I make a P2P application?

    I had research the bidir example and glacier2callback example. But the example case is not the P2P network environment. I want to make a P2P chat program, the program instance connects to another program instance throught the server has the real ip! How can I do it. Somebody can give example code?

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Welcome to the forums! Please update your signature as explained in this post.

  3. #3
    autofish is offline Registered User
    Join Date
    Apr 2006
    Posts
    4
    Thanks for marc, anxious for your help.
    Name:Neko Chen
    Companyr.Peng Co.Ltd
    Company URL:http://www.drpeng.com.cn
    JOB:An Online Game named DreamCity

  4. #4
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    I'm not sure I understand your question.

    If the endpoint ports of your application are publically accessible then applications can connect directly to the application and exchange data. Since most of our networks these days are protected by routers/firewalls and live in private IP space (192.168.x for example) then this generally is not the case. In this case you have two choices:

    - Make the port publically accessible. This can be done either by hand (editing the routers port forwarding table), or your application can do this automatically using some router protocol (UPnP for example).

    - Make use of bi-directional connections and some central authority. This is what "low-id" ports do in emule. All data is forwarded by a central server. This solution can also get more creative by using another peer that is publically accessible to forward data.

  5. #5
    autofish is offline Registered User
    Join Date
    Apr 2006
    Posts
    4
    I want the client sends data to another peer without getting across the server. So that it can cut down the server load.
    Name:Neko Chen
    Companyr.Peng Co.Ltd
    Company URL:http://www.drpeng.com.cn
    JOB:An Online Game named DreamCity

  6. #6
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    All you need for a client A that wants to send data to a client B is a proxy to an appropriate Ice object in client B. However, ususally firewalls will not allow you to send data directly from one client to another.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Make error
    By brandon.scott in forum Help Center
    Replies: 7
    Last Post: 09-03-2010, 06:33 AM
  2. how to make the application static link to ICE
    By bowei in forum Help Center
    Replies: 2
    Last Post: 10-12-2007, 11:36 PM
  3. can't make Ice3.1
    By timberwolf in forum Help Center
    Replies: 1
    Last Post: 08-01-2006, 10:04 PM
  4. Replies: 1
    Last Post: 01-06-2006, 06:25 AM
  5. Can't run make
    By svranyes in forum Bug Reports
    Replies: 4
    Last Post: 07-16-2003, 10:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •