LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-16-2012, 12:44 PM   #1
riaria
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Rep: Reputation: Disabled
Question want to know about client server programing in c


is there any book which can give me programs on client-server programing in c
ex:
Write and run a client and a server program using C - language in UNIX with the 15
following specification :
• UDP client should send two strings to a UDP server.
• UDP server will concatenate both the strings and send to the client. The clientprogram prints the result.
 
Old 10-16-2012, 01:18 PM   #2
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Hi, welcome to LQ

We have a rule here, we don't do assignments. But in your case, as you request information about the subject, we will be happy to help you on that. There is many way to solve your problem. There is both low and high level APIs to do this. The low one, the one I am assuming you need to use, is called POSIX. Doing some basic UDP code does not require reading tons of books. Just google "udp socket C linux" and you will get plenty of ressources. First, learn how to compile a basic "Hello world!" C application with GCC and a makefile to setup your environment for development if it's not already done). Do it in command line, but thee is also many IDEs that can automate much of the process.
 
1 members found this post helpful.
Old 10-17-2012, 05:08 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Read and learn http://beej.us/guide/bgnet/
 
1 members found this post helpful.
Old 10-18-2012, 01:06 PM   #4
riaria
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks a lot for the response.

thanks.this is not my assignment question it was just an example.actually client-server program is totally new for me.I am studying by correspondence and I neither have any teacher to explain nor any lab for practice. we don't have any list of questions I got this question from last year question paper.you will be surprised I don't know to connect client & server so that they can communicate.thanks again.
can we have client & server on same computer?
 
Old 10-18-2012, 02:02 PM   #5
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
yes, you can have the client and server on the same computer. you probably want to have your client create a socket connection to your server (they can be different machines or the same machine -- be careful of firewalls, security policies, and antivirus programs). your server will need to create a listening socket and wait for connections.

If you want a book, this one is pretty technical, but probably explains everything:
http://www.amazon.com/Unix-Network-P.../dp/0131411551
 
  


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
zmq client server program ..my client is working but server is not..pls help batman4 Programming 2 08-13-2012 07:44 AM
[SOLVED] problem with server-socket programing chandinisree Linux - Networking 10 08-23-2010 03:49 AM
Sockets Programing Client/Server ashucool83 Programming 9 09-30-2005 02:43 PM
Refresh client user list at autentication client/server network. robertoneto123 Linux - Networking 0 11-11-2003 10:38 AM

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

All times are GMT -5. The time now is 10:00 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