General
cancel
Showing results for 
Search instead for 
Did you mean: 

how to Develop a Chat tool in C on Unix/Linux OS

Soujanya
Valued Contributor

how to Develop a Chat tool in C on Unix/Linux OS

Hi All,

I'm trying to learn C on Unix/Linux. I want to create a Chat application using C, on Unix/Linux platform.

Could anyone guide me?

Well, I would want the chat tool to :
--> Be able to connect to multiple clients at a time
--> Display who(clients) are logged in at any point of time
--> Be able to save the conversation if needed
--> Chat server should be able to list all the logged in users too

I am not sure how complex this could be doing in C on Unix/Linux.. But, kindly help me in doing this.

Note: Please refer if at all there is any opensource already with these ( may be more features too) functionality. So that I can have even more clear guidence.

Thanks in Advance.
Soujanya.R
4 REPLIES
Alpha977
Valued Contributor

Re: how to Develop a Chat tool in C on Unix/Linux OS

Hello!

What you want to do is not easy, expecially for a newbie of C.

First of all i think you need a server, where the client can connect and you can use server for distribuite the client.

I think is better to do it in Java, in Internet are very example where you can learn how it work.
If you use Java you can integrate into the web of your intranet, and your client no need a client software.

I have this link for reference and learn the C programming.

http://www.cs.cf.ac.uk/Dave/C/

Is not easy, and probably is prefer to proceed by step :)

This link explain how to build an C++ chat example.
http://edocs.bea.com/tuxedo/tux80/srv2srv/cplus.htm

Hope helpful

Bye!
Srimalik
Valued Contributor

Re: how to Develop a Chat tool in C on Unix/Linux OS

Hi,

As u say, you want the application in C
I will suggest:
--starting with sockets and create a simple client and server which can accept and send messages to each other turn by turn.
--Then u can add code to find the users who are online (may be a config file to store your friends will be needed), this will require some space management for the screen u r using.
You have two options , Curses or GTK
--To support chatting with multiple users u need to look at threads.
best of luck :)

abandon all hope, ye who enter here..
George Liu_4
Trusted Contributor

Re: how to Develop a Chat tool in C on Unix/Linux OS

why don't you pick up a opensource project like
psi
gaim

or the like to read the source code first?
Darrel Louis
Honored Contributor

Re: how to Develop a Chat tool in C on Unix/Linux OS

Hi Soujanya,

There are loads of tools available:
http://www.jabber.org/software/clients.shtml

Goodluck

Darrel