分享

The Linux socket, TCP/IP protocols and client

 astrotycoon 2016-10-10

My Training Period:  xx hours

 

Note:  Program examples if any, compiled using gcc on Linux Fedora Core 3 machine with several update, as normal user.  The Fedora machine used for the testing having the "No Stack Execute" disabled and the SELinux set to default configuration.

 

The abilities that supposed to be acquired:

  • Able to understand the basic of client-server model.

  • Able to understand the TCP/IP suite/stack/layer.

  • Able to understand important protocols such as TCP and UDP.

  • Able to understand and use the Unix/Linux C language socket APIs.

  • Able to understand and implement several simple Client and server basic designs.

This Tutorial introduces a network programming using sockets.  Some of the information is implementation specific but all the program examples run on Fedora 3 and compiled using gcc.  The following are topics that will be covered briefly.

  • Some Background Story.

  • The Client-Server Model.

  • Concurrent Processing.

  • Programming Interface.

  • The Socket Interface.

  • Client Design.

  • Example Clients.

  • Server Design.

  • Iterative, Connectionless Servers (UDP).

  • Iterative, Connection-Oriented Servers (TCP).

  • Concurrent, Connection-Oriented Servers (TCP).

  • Single-Process, Concurrent Servers (TCP).

  • Multi protocol Servers.

  • Multi service Servers.

  • Managing Server Concurrency.

  • Client Concurrency.

Some Background Story

  • This background story tries to introduce the terms used in network programming and also to give you the big picture.

  • The following figure is a typical physical network devices connection.

A physical network connection illustration

Figure 1

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多