LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-29-2008, 07:26 AM   #1
aq_mishu
Member
 
Registered: Sep 2005
Location: Bangladesh
Distribution: RH 7.2, 8, 9, Fedora
Posts: 217

Rep: Reputation: 30
C code hint for versity project


All i need is a client and a server on TCP with concurrency. (i mean the use of fork()). The server will listed on an ip+port. The client will connect to the server and send some info to the server. mostly all of them are text. and finally the server will accept them and save them in a file. Now i need help... specially i have a code segment of a echo server, but i need a piece of code as a help as atleast sending a string. If i can send a string from server to client and vice versa, i can do the rest... please help me...

i have no time and my lots of grade depends on it.... help me guys...
 
Old 10-29-2008, 08:22 AM   #2
brazilnut
Member
 
Registered: Nov 2007
Posts: 113

Rep: Reputation: 16
Always the place to start... (http://beej.us/guide/net/)
 
Old 10-29-2008, 07:02 PM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Quote:
Originally Posted by aq_mishu View Post
All i need is a client and a server on TCP with concurrency. (i mean the use of fork()). The server will listed on an ip+port. The client will connect to the server and send some info to the server. mostly all of them are text. and finally the server will accept them and save them in a file. Now i need help... specially i have a code segment of a echo server, but i need a piece of code as a help as atleast sending a string. If i can send a string from server to client and vice versa, i can do the rest... please help me...

i have no time and my lots of grade depends on it.... help me guys...
Did they give you an assignment without teaching you the concepts behind it? That site from brazilnut seems decent, but always make sure to read the manpages/infopages (specifically info libc) so that you actually learn what to do in situations other than those in the tutorial.
ta0kira
 
Old 10-29-2008, 07:05 PM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Ask your TA. That's what they're there for. Also, until I read the word "grade", I was thinking about suggesting using socat, or, if you really wanted to code something yourself, using SDL for sockets (it's dead simple and portable) and concurrency (threads are not that bad either). But as this is homework, there's likely requirements you haven't told us about...
 
Old 10-29-2008, 07:12 PM   #5
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
That, and a grade is given for a reason...
ta0kira
 
  


Reply



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
LXer: Debian Project participates in Google's Summer of Code LXer Syndicated Linux News 0 04-26-2007 01:16 AM
LXer: Code bits, Open-Source Libraries, and project ideas LXer Syndicated Linux News 0 03-31-2007 09:31 PM
LXer: IBM Donates Privacy Code to Open Source Project LXer Syndicated Linux News 0 01-28-2007 02:21 PM
Idea for GAIM add-on (maybe a Summer of Code Project) jwinter Linux - Software 5 06-26-2005 06:49 PM
How to count how many lines of code my project is? The_Nerd Programming 4 08-30-2004 08:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:36 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
Open Source Consulting | Domain Registration