LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-08-2008, 08:56 AM   #1
memisbah
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
client/server echo program of UDP sockets


Hi!!!
ive completed two of my tasks but im stuck in the third one..its a modified C program of UDP client/server echo.
briefly describing my program, the server has to accept two operands and the basic mathematical operator, process them and send the result back to the client.
the program should have the following features:

-the client should first ask the status of server that whether its running or dead.
-then the server should ask for the left operand. it sholud be sent by client and it shud be acknowledged by the server through some message.
-after that the server should ask for the operator (+,-,*,/) and acknowledge it.n repeat the same process for the right operand.
-after having all the data the server should process that mathematical expression and send back the result to the client n the client should display it.

ive tried various things, like multiple recvfrom() commands but its not working..im running it on fedora core7 environment. anybody who could help me n send me the code on my id memisbah@gmail.com
i require it urgently by tonight.
i'l be obliged. thanku!
waiting for help!
 
Old 04-08-2008, 09:14 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,149

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
1. This looks like homework which is against the forum rules. Asking for specific help is not a problem but do not ask us to do it for you.
2. Urgency on your part it not important for people who volunteer their free time to help others.
 
Old 04-08-2008, 11:27 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
The best way to do this is to get the IPC working with a fork and either pipe or socketpair. Once that's working, figure out how to make the connections and separate the program into 2.
ta0kira
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
client/server question (with sockets) bicycle Programming 1 11-24-2005 02:26 PM
Sockets Programing Client/Server ashucool83 Programming 9 09-30-2005 03:43 PM
how to get client ip address at udp server cranium2004 Programming 2 03-22-2005 12:35 AM
Server Client program using UDP frostmagic Programming 9 11-15-2003 12:06 AM
Server/Client-commucation via TCP-Sockets cYbORg Programming 5 05-18-2003 07:01 PM


All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration