Windows Socket network programming study Note 1

Source: Internet
Author: User
Author: Zhu Jincan

Source: blog.csdn.net/clever101

 

 

 

How does one understand windows socket?

 

My understanding: Windows Socket is equivalent to a communication channel opened by two network entities on the Windows platform. The implementation details of this communication channel are invisible to both sides of the network (haha, you will know that it is made in Windows ). Through this channel, both parties can transmit various types of data.

 

You may be anxious to ask how this channel was opened? Next I will describe the server segment and client as both sides of the network. See:


Do you understand this? The connection between the server and the client is actually the connection between the server socket and the client socket. What is the specific procedure? In fact, it is very simple to create a socket class object in the server program, create a socket class object in the client program, and then hand over the network communication work such as connection and data transmission to them.

 

After understanding the socket communication model, Do you think Windows Socket network programming is not as difficult as you think? Then you can learn about the usage of the socket class casyncsocket and csocket class in MFC. We recommend that you take a look at the article Windows Sockets:
Socket communications and the following

MSO; MSO-font-kerning: 0pt "> • Windows
Sockets: using class casyncsocket

MSO; MSO-font-kerning: 0pt "> • Windows
Sockets: deriving from socket classes

MSO; MSO-font-kerning: 0pt "> • Windows
Sockets: How sockets with archives work

MSO; MSO-font-kerning: 0pt "> • Windows
Sockets: Blocking

MSO; MSO-font-kerning: 0pt "> • Windows
Sockets: byte Ordering

MSO; MSO-font-kerning: 0pt "> • Windows
Sockets: Converting strings

    MSO-bidi-font-family:; MSO-font-kerning: 0pt "> MSO-bidi-font-family:; MSO-font-kerning: 0pt "> In fact, the socket class in MFC is similar to the cwnd class, that is, there are some message excitation functions. You need to understand the conditions under which these functions will respond. Finally, I suggest you understand the routine of Windows Sockets: Socket comprehensions (click the samplemso-Hansi-font-family: "Times New Roman" '> link ), it is a simple chat program, which is very helpful for understanding socketmso-Hansi-font-family: "Times New Roman" '> (I just got it from that ).

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.