Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

Help - P2P connection in .Net - like Yahoo does for IM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mahesh Devjibhai Dhola - 04 Mar 2005 08:58 GMT
Hi,

I want to develop p2p (peer-to-peer) communication connection for chat in
.Net (Lang: c# - preferable)
NOTE: if two LAN are behind their own router then also it should work as
yahoo, msn messenger works.

Let me explain scenario:
In yahoo:
- We login to yahoo server from yahoo messenger (yahoo server listens at
port 5050).
- We get list of yahoo users in our friend list of messenger.
- Let's say I am P1 with local IP (LAN) with 192.168.0.10 with some external
IP.
(At my side, I am using Internet connection sharing from one PC - let's say
it will have some external IP through which it connect my LAN to internet
and will have 192.168.0.1 IP because we have enabled ICS.)
- We double click on one ONLINE user say P2 with Local IP 192.168.0.5 (P2
will have same scenario as P1 - uses ICS)
- we write a message and send to P2 (This message is first goes to yahoo
server and then server will send it to P2 and then P1 and P2 will be
connected directly as P2P.
{I don't know how yahoo server creates P2P connection between P1 and P2})
- We get message from P2 if he write something.

Now P1 and P2 don't use Yahoo server and connected directly as P2P
connection.
P1 has started the communication for IM so P1 will have 5101 listening port
in case of Yahoo, and P2 will send message to 5101 port.

if P1 and P2 both are behind router then also the communication is possible
in case of yahoo messenger without making any change in router configuration
and both P1 and P2 can chat.
(i am sure about this with DLink router)
So, in this way P1 > 192.168.0.10:5101 (from one LAN) is connected with P2 >
192.168.0.5: xxxx (from another LAN). And both LAN is connected with
Internet through router or ICS server with an External IP uses for outer
interaction with Internet.
(I got all the information about Yahoo communication by capturing and
analyzing the network packets.)
I think this is the same case as IRC or MSN messenger also, just chat
protocols are different. Yahoo uses YMSG protocol.

Question: how this is possible with .Net?
Or if it is not possible through .Net APIs then how can we achieve the
functionality of P2P like yahoo messenger?

I have tried a lot using Sockets in .Net but still not able to solve this.
Please help me out of this.

I am able to connect P1 to P2 if P2 is on the internet with some
external/static IP but cant if it's behind router (like P2 in case of Yahoo
in above explanation).
Now if we provide some server like application then also P1 and P2 can
connect that server but how P1 will communicate with P2 as P2P
communication?
How the server or P1 can establish P2P connection with P2?

Please provide me some idea... Help me out of this....

Thanks in advance,

Mahesh Devjibhai Dhola
"Empower yourself...."
William DePalo [MVP VC++] - 04 Mar 2005 15:57 GMT
> I want to develop p2p (peer-to-peer) communication connection for chat in
> .Net (Lang: c# - preferable)
> NOTE: if two LAN are behind their own router then also it should work as
> yahoo, msn messenger works.

At this location

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/lcs2005/rtc/abo
ut_the_rtc_server_application_api.asp


you will find information about the Live Communications Server and its
Session Initiation Protocol (SIP) based functionality and client API. You'll
also find this blub there

<quote>
The Live Communications Server Application API enables the creation of
applications that extend and enhance the SIP-based functionality of
Microsoft Live Communications Server. From developing custom message filters
and routing applications to multithreaded transactional models and secure
logging functionality, this set of APIs targets developers who want to
implement a custom centralized real-time content delivery or instant
messaging infrastructure for the enterprise.
</quote>

For accessing the server via a managed application check the docs for the
Microsoft.Rtc.Sip namespace.

I'm sure the MS server targets enterprise applications on a LAN, I'm not
sure if it does the WAN thing as well. You'll need to do some research on
your own.

FWIW, there is also an open-source IM-type application at

http://www.jabber.org/about/overview.shtml

but I doubt that it would be easy to convert to a managed application,
though that's just a guess on my part.

Regards,
Will

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.