Basic C Socket Program Client/Server text file content transmission! DESPERATE HELP!!
Hi everyone,
This is my first post to these boards and I hate for it to be the way that it is but I'm pretty much desperate and I need urgent help. If I'm at all breaking the rules please let me know. I REALLY need help to get an assignment done, I don't want anyone to do it for me, I just need to get it done.
I have about 40 hours to get this done and I don't plan on sleeping until it's done.
The basic problem:
I need to create a client/server program in C using sockets.
I need the client to be prompted with a menu like "Enter a name".
The client then enters a name eg "Billy Bob", this gets sent to the server.
The server has a text file with a bunch of names listed like:
Name Age Hair Color
Billy Bob 18 Black
James Lol 22 Brown
Chris H 90 Red
the server then receives the request sent from the server "Billy Bob" and looks in the test file and sends the client back "Billy Bob's is 18 years old, he has Black hair" or if the user requested a person not in the text file "sorry, that person does not exist".
So basically I need a client to send a request, a server to act on that request and transmit the information back.
I have searched for about 4 hours for a tutorial or something similar to this problem for about 4 hours now and the closest I have got is a tutorial on sending "Hello World" from the server to the client.
That program is not very helpful, while I follow the tutorial it doesn't require the client to send anything to the server, and the server does not query, it just sends that no matter what.
I am not asking for anyone to do this for me, I would just like some guidance on where to start, if anyone knows of any documents or anything that I can read which will assist me I will be very grateful.
I'm generally not someone who leaves things to the last minute, and I really cannot afford to fail this assignment. If someone would be willing to help guide me through the assignment via an IM service I would happily give them some money, by no means do I want someone to do it for me, just some guidance and help to ensure I get it done.
I'm a competent programmer in c++ but I'm fairly new to c, I've basically done 10 weeks of this subject, 4 weeks I was away overseas for family issues. I've learned most things up to creating basic threads.
Please, I'm pretty desperate and if anyone can help me I'll be greatly appreciative.
Thanks guys!
P.S Am I screwed? Do you personally think this task will be out of my league in the time I have to complete it (I'm really dying from stress here as I really can't find anything to help me and I feel like I'm running out of time)