Entering the network programming

  After years of network programming practice, personally I feel that novice network programmers can carry out the following steps:

    1) a can download interactive learning tool, through this interaction with this tool, we can promptly learned of the results of each api in case. I strongly recommend a good interactive tool, python, Download http://www.python.org  for friends c / c ++ or java-based transit time of a week or two can get started, the other individual is recommended for beginners you can learn Dive
INTO Python
.     2) master a few basic concepts of programming and content network will be used, such as IP address, port number, socket, etc.     3) remember and digest Network Programming C / S model, the server and client-side programming model common understanding and digestion     4) spend a few days learning set socket api, api set can be divided into the following categories:        create a socket bind listen accept        transceiver read / recv / recvfrom write / send    / sendto        close close shutdown        parameters getsockopt / setsockopt        address gethostbyaddr getaddrbyhost, ...        in these api time to learn, we can focus on the function of the function, parameter meaning
       













    5) combined with python interactive platform, the practice of socket api usage, such as how to use the function socket, bind how to use and so on. In an interactive process, we can transform parameters and see how to call the result. For example,
       to create a tcp socket syntax is as follows:
       Socket (AF_INET, SOCK_STREAM)

       syntax to create a udp socket as follows:
       Socket (AF_INET, SOCK_DGRAM)

    . 6) Learning socket server-side programming simple statute, such as echo, time, etc., then through the cmd the telnet to test.

    7) Learn I / O model, such as blocking, non-blocking and reactive (select, poll, WaitForMultipleObject), etc.

    8) Richard Stevens of learning "Unix Network Programming", api-depth study of the principles and server design principles which, by write code.

    9) Download a high-performance network programming framework Twisted , I strongly recommend, it will make more than 10 times the efficiency of your network programming.

    10) study design patterns, such as knowledge of operating system threads, processes, synchronization.

Published 50 original articles · won praise 67 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_41033366/article/details/103657092