|
-
Feb 16th, 2006, 07:35 AM
#1
Thread Starter
Fanatic Member
create a instant messenger type application
hi
i am looking into the possibility of creating a simple instant messaging service.
i am still reading up on different aspects before i start lol
but should the program be a windows application that accesses the internet
or
should it be a webservice
or
should it be an asp.net application
are there any examples out there of creating such a program
please forgive my ignorance
it works 60% of the time, all the time.
-
Feb 16th, 2006, 02:35 PM
#2
Fanatic Member
Re: create a instant messenger type application
I suppose it could be a web app, but look at the down sides. There are no ways to refresh the users screen when they recieve a message, the best you can do is refreshing the web page every 5 seconds or so just to see if the other person has said anything. That would also require a round trip to the server and possibly lots of conversation text either being stored on the server, or transported back and forth every 5 seconds in this example.
I believe web services are also stateless, like web apps. So you would need to call the web service every 5 seconds to see if any new messages came in.
Your best bet is a windows app. If each user logs in by establishing a socket connection to the server, then updates about incoming messages can be sent instantly. Also, the conversation data would be held on each users computer and would not have to take up memory on the server or be taken round trip during a refresh.
The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.
-
Feb 16th, 2006, 05:24 PM
#3
Re: create a instant messenger type application
The 2003 101 Samples contains a client/server chat application as an example of using Sockets. I don't know about 2005 but you can always convert the 2003 project.
-
Jul 6th, 2006, 06:06 AM
#4
Thread Starter
Fanatic Member
Re: create a instant messenger type application
i can run the example fine on my machine
now i want to test it over the internet
i think the code i am having trouble with is
client = New TcpClient("xx.xx.xxx.xx", PORT_NUM)
this is code from the client where the client wants to connect to the server,
how can i specify the servers ip. the above does not seem to work.
it works 60% of the time, all the time.
-
Jul 9th, 2006, 03:17 AM
#5
Re: create a instant messenger type application
 Originally Posted by DNA7433
I suppose it could be a web app, but look at the down sides. There are no ways to refresh the users screen when they recieve a message, the best you can do is refreshing the web page every 5 seconds or so just to see if the other person has said anything. That would also require a round trip to the server and possibly lots of conversation text either being stored on the server, or transported back and forth every 5 seconds in this example.
Have a look at Meebo. They make extensive use of Ajax to get around the stateless problem. The concept is essentially to open a persistent connection to the server using the XMLHttpRequest Javascript object. This means the server can communicate to the client whenever required, the connection is simply flushed and recycled. It is very bandwidth-efficient.
Basically it's possible either way however the principles and knowledge required are quite different. Javascript can be a tricky language if you are not already skilled in using a strongly typed language.
Also, as a technical point - ASP.NET/web service/web site are all basically the same. The only difference is a web service is not generally accessed through the graphical front end of a web browser, whereas a website is.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|