Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-16-2012, 01:44 PM   #1
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
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, 02:18 PM   #2
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 128Reputation: 128
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, 06:08 AM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Read and learn
1 members found this post helpful.
Old 10-18-2012, 02:06 PM   #4
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 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, 03:02 PM   #5
Senior Member
Registered: Dec 2004
Posts: 1,027

Rep: Reputation: 67
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:


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

All times are GMT -5. The time now is 04:23 PM.

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