Linux TCP socket guide

For those interested in programming TCP/IP sockets under linux the following links are some solid articles that I have come across on this subject. They cover such topics as blocking and non-blocking TCP sockets, TCP keepalive uses, and some linux socket pitfalls to watch out for.

  • The first PDF article Using TCP through sockets covers client and server programming for blocking and non-blocking sockets. The article also contains C programming examples of both types of clients and servers.
  • The second article TCP Keepalive howto explains in great detail what the TCP keepalive message is used for under linux and has a quick C code example.
  • And lastly Five pitfalls of Linux sockets programming is a very good article on some pitfalls that you may encounter when programming your TCP clients and servers.

If you have come across any other good articles on TCP or UDP sockets let me know.

Filed under: Notes, Linux  Tags: C

0 Responses to “Linux TCP socket guide”

Sorry, comments have been closed for this post.
(default) 11 queries took 5 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1DESCRIBE `posts`17171
2DESCRIBE `comments`11111
3DESCRIBE `tags`221
4DESCRIBE `categories`221
5DESCRIBE `posts_tags`221
6DESCRIBE `categories_posts`220
7SELECT `Post`.`id`, `Post`.`url`, `Post`.`title`, `Post`.`icon`, `Post`.`metadesc`, `Post`.`metakeys`, `Post`.`categories`, `Post`.`tease`, `Post`.`body`, `Post`.`private_body`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`allow_comments`, `Post`.`tags`, `Post`.`hitcount`, `Post`.`hitcount_rss` FROM `posts` AS `Post` WHERE `Post`.`url` = 'linux-tcp-socket-guide' LIMIT 1110
8SELECT `Comment`.`id`, `Comment`.`post_id`, `Comment`.`body`, `Comment`.`author`, `Comment`.`url`, `Comment`.`email`, `Comment`.`ip`, `Comment`.`status`, `Comment`.`junk_score`, `Comment`.`created`, `Comment`.`modified` FROM `comments` AS `Comment` WHERE `Comment`.`status` = 2 AND `Comment`.`post_id` = (47) 000
9SELECT `Tag`.`id`, `Tag`.`tag`, `PostsTag`.`post_id`, `PostsTag`.`tag_id` FROM `tags` AS `Tag` JOIN `posts_tags` AS `PostsTag` ON (`PostsTag`.`post_id` = 47 AND `PostsTag`.`tag_id` = `Tag`.`id`) 110
10SELECT `Category`.`id`, `Category`.`category`, `CategoriesPost`.`post_id`, `CategoriesPost`.`category_id` FROM `categories` AS `Category` JOIN `categories_posts` AS `CategoriesPost` ON (`CategoriesPost`.`post_id` = 47 AND `CategoriesPost`.`category_id` = `Category`.`id`) 220
11UPDATE `posts` AS `Post` SET `Post`.`hitcount` = Post.hitcount + 1 WHERE `Post`.`id` = 4710