473,657 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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:51 01 (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...."
Nov 17 '05 #1
1 1980
"Mahesh Devjibhai Dhola" <md*****@hotmai l.com> wrote in message
news:eX******** ******@TK2MSFTN GP09.phx.gbl...
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/de...cation_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.S ip 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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3655
by: Aaron | last post by:
Can someone please help me close this db connection. I know the connection is not closed because there;s a ldb file in my db folder. dbCommand.Connection.Open(); IDataReader myReader = dbCommand.ExecuteReader(); while (myReader.Read()) { return myReader.GetString(1); }
2
2424
by: Mahesh Devjibhai Dhola | last post by:
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
2
9733
by: Sam | last post by:
A) Destination Table with 4 Fields. 1) Last Name 2) First Name 3) State 4) Zip Code. B) Look up table State/Zip Code with 2 Fields
5
1632
by: Sam | last post by:
Hi all, I have a process which first pulls one time all application IDs from a database and stores them in a table(this process works fine everytime). I then loop through the table, one at a time, and use application id to pull details info and process it. For example, if I have 500 records in my table, then I would have to open database 500 times. Also between processing each record, my process sleep 3 seconds. The problem is that...
5
2256
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web Application called "Lesson18b" under "C:\Inetpub\wwwroot\Lesson18b". 2) I have one Web Form on this Lesson called "Form18b.aspx" 3) In this same Folder under Inetpub I have the Microsoft NorthWinds
16
2862
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with a worker thread that would execute the db commands. The pool was fixed and all the connections were created when the db access class was instantiated. The connections remained opened during the whole execution. If a connection was not available...
0
5558
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
4
1483
by: Ron | last post by:
I am having a bit of problem with this code: Dim cmd As New OleDb.OleDbCommand("INSERT INTO help (Name, Email, telephone, description)VALUES('" & txtName.Text & "','" & txtEmail.Text & "','" & txtTelephone.Text & "','" & txtDescription.Text & "')", New OleDb.OleDbConnection(strconn)) at the end, strconn is underlined in blue and says not defined, I dont know what to do with this, how do I define it?
9
4756
by: fniles | last post by:
I am using VB.NET 2003 and SQL 2005. To use connection pooling and avoid the error "There is already an open DataReader associated with this Connection which must be closed first." , I understand that I want to release/close connections in a timely fashion. What I do is I declare the SqlClient.SqlConnection variable as a local variable inside my subroutine (instead of a global variable). Right before I Fill the dataset I open the...
14
2982
by: Omar Abid | last post by:
Hi, I'm using my with a program to detect an internet connection. It return true when I'm connected, but even when I 'm disconnected it returns true I don't know why ? Thx Omar Abid
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.