Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.