473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Creating an Instant Messenger

Dee
Is C++ the best language to create a Windows based Instant Messenger?

Something along the lines of MSN Messenger, ICQ, Yahoo Chat, etc?

Are there any downloadable full or trial SDK's out there?

I used to use Visual Basic a long time ago but want to create the
fastest, easiest for the end user to install, most reliable software
program possible

I certainly prefer the more visual approach to programming
Jul 23 '05 #1
10 10701
Dee wrote:
Is C++ the best language to create a Windows based Instant Messenger?
C++ is for big, hard, high-performance programs. A chat client is small,
easy, and low-performance.
Something along the lines of MSN Messenger, ICQ, Yahoo Chat, etc?

Are there any downloadable full or trial SDK's out there?
http://sf.net
I certainly prefer the more visual approach to programming


For the brief period of painting a dialog box for your client, you will get
visual. The rest is logical.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #2
Dee wrote:
Is C++ the best language to create a Windows based Instant Messenger?

Something along the lines of MSN Messenger, ICQ, Yahoo Chat, etc?

I suppose all these were written in C++.

Are there any downloadable full or trial SDK's out there?

There are SDKs for interacting with these messengers. However I suppose if you want to
write your own messenger, this has nothing to do with these SDKs. What you will need to
know is networking and multithreading. Most network applications involve multithreading.

I used to use Visual Basic a long time ago but want to create the
fastest, easiest for the end user to install, most reliable software
program possible

I certainly prefer the more visual approach to programming

In VS 2003 and the upcoming VS 2005 all languages share the same Designer (RAD), so there
is no problem with that.

In fact myself am studying .NET networking these days, and what I am currently reading is
a sample network TCP chat client! This is two pages of code including the GUI code which
is automatically produced by the Designer. So we can say that it is relatively easy to
write your network chat client (at least under .NET).

However you will have to learn multithreading first, and this is somewhat demanding.


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #3
Ioannis Vranos wrote:
In fact myself am studying .NET networking these days, and what I am
currently reading is a sample network TCP chat client! This is
about 4
pages
of code including the GUI code which is automatically produced by the
Designer. So we can say that it is relatively easy to write your network
chat client (at least under .NET).

However you will have to learn multithreading first, and this is
somewhat demanding.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #4
Ioannis Vranos wrote:
In fact myself am studying .NET networking these days, and what I am
currently reading is a sample network TCP chat client! This is
about 4 pages
of code including the GUI code which is automatically produced by the
Designer. So we can say that it is relatively easy to write your network
chat client (at least under .NET).

However you will have to learn multithreading first, and this is
somewhat demanding.


I thought WinSock turned 'net input events into windows input events,
meaning you could write an event-driven chat client that needs no threads.

I also thought you could simulate WinSock by multiplexing socket handle
semaphores with your message queue.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #5
Phlip wrote:
I thought WinSock turned 'net input events into windows input events,
meaning you could write an event-driven chat client that needs no threads.

I have to say that I am in the beginning of the networking chapter, so I know few things
so far. Also I do not know what exactly is the Winsock that you are talking about.
Naturally there are probably events for which we can assign member functions of our
classes as handlers, however not using multithreading implies that we are doing only one
task at a time. So for example upon sending a message (even in a matter of milliseconds
time), the client would not be able to receive a message or allow us to type. The same
upon receiving. And I suppose even when we are typing we will not be able to send or
receive (in console it is certain, since the program would wait until we press enter to
pass the input in cin and I suppose the same applies for GUI text boxes, since this is
also a type of input, and the typing itself raises events).
Perhaps you know more on this issue, what I have read so far is that networking "always"
involves multithreading (apart from some unusual cases I suppose).

I also thought you could simulate WinSock by multiplexing socket handle
semaphores with your message queue.

I don't know what exactly you are talking about. The fundamental class of .NET networking
is the Socket class which is considered the most low level part. However you never use
that class directly under usual circumstances, you use higher level classes that use the
Socket class, and their methods manipulate their underlying Socket objects.
So here is how you are making a client and connecting to a server instantly:
TcpClient *client= __gc new TcpClient;

client->Connect(serverAddress, serverPort);
It is nice, isn't it? :-)

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #6
Ioannis Vranos wrote:
Also I do not know what exactly is the Winsock that you are talking about. .... Perhaps you know more on this issue, what I have read so far is that networking "always" involves multithreading (apart from some unusual cases I suppose).


By "event driven" I don't mean a .NET kernel calls events in our program.

I mean one takes apart the message sending and receiving protocol, down to
the byte level, such that temporary state, such as the position of the
file-pointer within an outgoing stream, are stored in object members, not in
local temporary variables. That allows you to write a top-level method
called, say, Pump(), that moves everything forward by one small increment,
then immediately returns.

Advanced 'net things need threads, when they are truly simplest. A

WinSock is MS's Berkeley Sockets implementation, invented during the Win16
single-threading era. It turns network events into windows events, so your
program only needs to block on and respond to window or network events. Such
an event would drop into our Pump() method.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


Jul 23 '05 #7
Dee wrote:
Is C++ the best language to create a Windows based Instant Messenger?


"Best" is a subjective term. Given the general requirements of your
typical chat client... I'd actually opt for Java - it has built in
threading and networking. A chat application doesn't need wildly high
performance so no worries there.

If you really want to use C++ (maybe as a learning experience?) then I'd
look at one of the rapid development environments. Maybe Borland C++
Builder and the Indy networking libraries. That combo would make
developing a chat client (and matching server) childs play.
Jul 23 '05 #8
Phlip wrote:
By "event driven" I don't mean a .NET kernel calls events in our program.

I mean one takes apart the message sending and receiving protocol, down to
the byte level, such that temporary state, such as the position of the
file-pointer within an outgoing stream, are stored in object members, not in
local temporary variables. That allows you to write a top-level method
called, say, Pump(), that moves everything forward by one small increment,
then immediately returns.

OK, I can't say much on these, since I do not know even enough .NET networking yet, as I
said in my previous message.
However the TcpClient and TcpServer classes use a NetworkStream object, which provides the
methods ReadByte() and Read() to read one and a sequence of bytes respectively and
WriteByte() and Write() to send one and a sequence of bytes respectively.
So to make your application connect to a server you do something like:

TcpClient *client= __gc new TcpClient;

client->Connect("www.mysite.com", 80);
NetworkStream *connection= client->GetStream();

// Receives a byte
int c= connection->ReadByte();
http://msdn.microsoft.com/library/de...dbytetopic.asp

http://msdn.microsoft.com/library/en...sreadtopic.asp
Advanced 'net things need threads, when they are truly simplest. A

WinSock is MS's Berkeley Sockets implementation, invented during the Win16
single-threading era. It turns network events into windows events, so your
program only needs to block on and respond to window or network events. Such
an event would drop into our Pump() method.

Well I do not know how things are done precisely in .NET yet. Perhaps we perform actions
like the byte receiving shown above, in event handlers. Perhaps tomorrow I will know a few
things more. :-)

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #9
Phil Staite wrote:
"Best" is a subjective term. Given the general requirements of your
typical chat client... I'd actually opt for Java - it has built in
threading and networking. A chat application doesn't need wildly high
performance so no worries there.

If you really want to use C++ (maybe as a learning experience?) then I'd
look at one of the rapid development environments. Maybe Borland C++
Builder and the Indy networking libraries. That combo would make
developing a chat client (and matching server) childs play.

I do not want to look like as not providing any other language option than C++, however I
can not see what advantage any other language such as Java, VB, C# or whatever would have
in comparison to C++.
A C++ developer can have whatever he needs for rapid development. For example have you
tried the latest VC++ lately?


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #10
Ioannis Vranos wrote:
Phlip wrote:
By "event driven" I don't mean a .NET kernel calls events in our program.
I mean one takes apart the message sending and receiving protocol, down to the byte level, such that temporary state, such as the position of the
file-pointer within an outgoing stream, are stored in object members, not in local temporary variables. That allows you to write a top-level method
called, say, Pump(), that moves everything forward by one small increment, then immediately returns.

OK, I can't say much on these, since I do not know even enough .NET

networking yet, as I said in my previous message.
Nothing I wrote has anything to do with .NET.
int c= connection->ReadByte();


Right here, there are two ways to get a string. You can loop, or you can
treat the input as an event.

This is not a .NET magic object Event - it's just an event. If you loop,
then you will block inside the loop. That leads some to think you must use
threads to chat.

If, instead, you treat inputs as an event, then you can block in one
thread - the same one that blocks for your windows events.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


Jul 23 '05 #11

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

Similar topics

0
by: CountScubula | last post by:
Hello everyone. Ok, a lot of people here have emailed me about instant messenger, so I took some code out of a project I buit, and posted the code. You can find it here:...
2
by: Evan McPeters | last post by:
Does anyone have an example of a simple Instant Messenger program written in Python? I have some code for a simple server and simple client communicating over TCP/IP, so I could always combine...
1
by: Peter | last post by:
Hi all, I have a website where users login to and I wish to add Instant Messenger between 2 users.. for instance, clicking "IM" on someone's profile (assuming they're online of course) will...
1
by: Mark R | last post by:
Hi All, I am trying to create an instant messenger tool within the database, mainly so messages can be left for colleagues on different shifts (not all of them have a mail account). I have created...
0
by: Colin Tiernan | last post by:
Hi, Can someone please put me right here. I've been asked to send messages to instant messenger through my asp.net 1.1 website, as a feature of a message board that I had to hand code. I...
0
by: Dean Sharp | last post by:
Hi For my university final year project i have been developing a instant messaging application based on the .net 1.1 framework. I would be very greatful if some people would give this...
6
by: lalejo83 | last post by:
How do I go about starting an instant messenger in C++. pLEASE HELP ME
2
by: John Doe | last post by:
Here's my issue: I have an instant messenger type feature for my site, its basically an ajax IM feature. I run with a mysql backend on the site, i have a div on my main page that runs a javascript...
1
by: Tarren | last post by:
Hi: Are there any good c# libraries for integrating aol instant messenger capabilities into my c# code? Thanks, Tayo
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.