Next Generation Emulation banner
1 - 2 of 2 Posts

· Registered
128 Posts
Discussion Starter · #1 ·
Well i have got project of designing a lan messenger using C language.I want to develop a lan messenger which can connect all the pc's into one single network and i also want to transfer data.Will this mean programming of ethernet adapter.I know C language very well but i dont know how to start this project.Can someone help me .
plz also tell me that can i develop this in windows 98 or i will have to switch over to Red hat LINUX...
and plz also tell me how much days will this program take if a single person is designing it .Or if someone has the coding then plz give me i will understand it by myself..
plz hurry i m in a great tension. :( :( :( :( :hdbash: :hdbash:

sohaib the snake

· Transcended
1,421 Posts
Yes, you can develop this in Win98 (see possible exception below). All you need is basic networking knowledge. You don't need to really interface with the Ethernet adapter directly.

First, come up with design on what port to use, what communication system (strings pasted together? XML? Binary??? Go figure).

Setup a server with a fixed location or IP that accepts connections from a client. Make it multi-threaded so it can accept multiple connections. That's a tricky part. POSIX threads are not implemented in Windows as well as in Linux. There are open source implementations (libraries), but if you can't use them, stick to a Linux server.

Make a client that initially connects to the server and registers itself as online, giving the server the client's IP, name, etc. Then, grab all the currently registered people so that you can have a list of people online. Messages are composed as message data plus source name, IP, destination name, IP etc... Send the data to the server in whatever data exchange format you choose.

The server simply acts as a forwarding station, forwarding the data to where it should go.

That's the bare bones. I didn't cover topics such as how to keep a realtime list of who's online, server originating messages (for controlling/maintaining the clients ) etc... there are lots of smaller details, but this should get you going in the meantime.

How many days for a single person? Well, I built an HTTP server (with images and safe coding practices! :) ) in around almost a week as a school project, so I had to juggle other stuff. But if you have all the time... it can be done well within two weeks I guess... depends on your experience and skill.

If you need to learn more on network programming... well... go ask Google. You'll get a lot of stuff. I can't teach you all you need to know in network programming here of course (too big a subject). But if you need further help, I'll try if you catch me around (since I don't visit frequently). But there are other C geniuses here.

EDIT: I was working on a C server the other day so my mindset was on pure C. I just remembered that you can make things easier. If specifications allow, and if you can handle it, try Visual C++. You can use Windows APIs to facilitate stuff, with APIs such as GetInternetConnectedState, and yes... CreateThread. You don't even have to handle annoying little endian/big endian translation. Now I can't help you here since I've never coded using these APIs. I only *discovered* them while... er... doing what I love best. :evil:

Good luck!
1 - 2 of 2 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.