LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2012, 10:03 AM   #1
shahidali_52
LQ Newbie
 
Registered: May 2012
Posts: 6

Rep: Reputation: Disabled
Post forking...multi threading


hi...i am shahid nawaz... i am new to socket programing...i can build programs of TCP/UDP server and client that are single client/server driven... now i have my semester project in which i have to use multi threading or forking....so i need simplest tutorial in c....or if anyone could help me...plzzzzzzz
 
Old 05-16-2012, 11:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
just use google.
http://www.amparo.net/ce155/fork-ex.html
http://www.daniweb.com/software-deve...mple-fork-code
 
Old 05-17-2012, 12:17 PM   #3
shahidali_52
LQ Newbie
 
Registered: May 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
bro.... i knw how simple fork works... what i asked is how you would implement fork in TCP/UDP server in order to handle multiple clients???
 
Old 05-17-2012, 12:39 PM   #4
xonogenic
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
I am pretty sure that we aren't here to do your homework for you. Reading through and understanding the links that were posted will give you a base to use forking, but actually understanding why and how it works is the point of this sort of assignment.
 
Old 05-19-2012, 04:21 AM   #5
shahidali_52
LQ Newbie
 
Registered: May 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Angry Mr xonogenic

Mr:xonogenic
bro its not the point which you are saying to me...to get understanding of the link point is that i asked different question and you and answered the wrong qstn....
 
Old 05-19-2012, 04:47 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,629

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
http://www.prasannatech.net/2008/07/...-tutorial.html
http://www.tenouk.com/Module41.html
http://www.cs.utah.edu/~swalton/list...kets/programs/
 
1 members found this post helpful.
Old 05-19-2012, 05:38 AM   #7
shahidali_52
LQ Newbie
 
Registered: May 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
pan64: thnx bro
 
Old 05-21-2012, 01:03 PM   #8
opaqueclover
LQ Newbie
 
Registered: May 2012
Location: Miami, Fl.
Distribution: Debian
Posts: 2

Rep: Reputation: 0
Unhappy What about threads?

Call me crazy but if you are programming sockets and (chances are high) you are using C, why not use pthreads for the incoming connections.
 
  


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
Multi threading in C pramod.srk Programming 2 03-01-2010 01:51 AM
multi threading slower than single threading on dual core. why? nebojsa.andjelkovic Programming 13 01-30-2007 09:56 PM
problems about multi-threading and/or multi-processing with tcp network in java ... alred Programming 5 06-23-2006 03:21 PM
Multi-threading rch Programming 3 03-30-2003 10:27 PM
Multi threading Mohsen Programming 5 03-01-2003 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:13 AM.

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