Winsock programming (preamble)

xiaoxiao2021-03-06  71

Preface - introduction

I hope that you will spend a little bit of reading the following introduction so that you will generally understand the main idea of ​​this tutorial. Although it is always opposite to the tutorial, it will eventually write it. Unlike previous tutorials, this tutorial is a chapter an open chapter. This is more beneficial to more readers to make the final version more perfect (Chinese people don't do this?) . However, I have to be careful to publish the order, one for the reader, two to avoid the article repeat or omissive ...

Although it is a Win32ASM's NetWorking tutorial, the role is definitely limited to the use of Win32ASM (very happy?) Most of which (should be all ...) The case can be implemented in other programming languages. I use Win32ASM and C two language implementations, and many of the tutorials are written in a language, but as for the examples and explanations of that language, such as readers are willing, Win32ASM is MASM (Earth people Know ...), readers with TASM or FASM can easily absorb them into their own programs. The same is true of the same C , and the C programmer believes that it will benefit from it. C code is passed on MSVC, BCC, and GCC, should be very easy to use.

I can't see it is eternal ...

Network programming looks very simple, you can use the Winsock functions without anyway, but unfortunately most beginners only know the call of Call, the results of the results are unstable. God, don't know the principle, how to solve the mistakes that make people can't touch the mind.

It seems that things are not what we imagine, just the transmission and receiving data is as simple as it is. For example: Do you race your brain for the transceiver? Whether the program has been prepared to send the next message? Another trouble is that the received data has a security hidden danger?

In summary, for this tutorial, there is no large number of code, just let you know the basic knowledge of the network before programming, and the main points of the network programming. Please don't disdain these prefabricated knowledge, in fact it is more important than true programming.

Let us get ready

A good Winsock API reference book, you can find an old Help format Winsock 2 API reference, this book has basically met our needs, and if there is the latest SDK data naturally. If you want to keep up with the times, you can download the latest PSDK, which contains the latest Winsock 2 data. If you can download a 'Winsock Debug Tool' with Win2K / XP / 2003. It is roughly similar to Sniffer, naturally has a variety of options, the author writes a tool (really not very easy, I recommend using Winsock Expert written by DXQ, but because of its small size, you can do character filtering So I like it very much. You can also use some professional sniffer such as Ethereal, Ipsniffer, etc.). These tools can easily display all data that open sockets and send and receive. There is a little Win32ASM or C programming basis. This tutorial is specifically for network programming, so I have assumed that you have the strength of choice. The next translation will come out soon, I will first post some simple network programs before you. Anyway, no one is watching ...

Original download (ASM)

Original download (CPP)

转载请注明原文地址:https://www.9cbs.com/read-93677.html

New Post(0)