Software Development with Linux

Linux Socket Programming

MON, 01 JUN 2009

Today, everyone love web applications. The focus now is on the web services, social networks, etc. To build them, you don't need to know how to do socket programming. But, socket programming was required in the web servers and application frameworks.

As I think it's always better to know the technology you're using, to allow you to use it in the best possible way, I think that basic socket programming should be understood.

There's plenty of books about that topic, but I would like to point out two (2) really nice tutorials instead. They are very well done, and cover a large subject.

Linux Network Programming (part 1 and part 2). Those articles appeared in the Linux Journal in 1999. They are brief, but cover everything you should know :

  • History of TCP/IP

  • Server programming

  • Client programming

  • Daemons

Linux Socket Programming Tutorial. This article is a lot longer and goes into more details. The indexing and navigation in the page doesn't work that good, but the content you'll find there worth it. In there you'll learn about :

  • Concept of TCP/IP

  • Network programming models

  • Detailed socket API

  • Lots of examples

  • Advanced examples

  • Security issues

Even if it's the C language that is used, the concepts there are useful for other languages as well. This is really the basic stuff, used by everything else.