It was not the first time I came into contact with socket programming, but I used to look at other people's pictures and don't know the specific principles.
A new project has a new start and requires a new understanding.
Delphi has two sets of TCP Socket components:
Indy Socket component (IdTCPClient and IdTCPServer) and Delphi native TCP Socket component (ClientSocket and ServerSocket ),
They are blocking and non-blocking methods;
There is also an open-source non-blocking Component ICS (Internet Component Suite)
[Users said: Indy can be used for non-large projects, and Indy can support IOCP + WSAPI connections of about 1000 network connections, which is not a problem]
After Delphi7, the TCP Socket component is invisible to the Panel. Instead of being discarded, the TCP Socket component is hidden.
[I guess the reason is that non-blocking occurs because Unix supports fork. Both the client program and server can fork new processes and start these processes, thus, blocking Socket can be easily used. Windows
3. x neither supports fork nor multithreading. When a blocking Socket is used, the user interface is "locked" and cannot respond to user input.
In the era of Delphi7, Windows has been greatly improved, and the multi-thread support has been very good. The non-blocking method is much more difficult than the blocking method. Of course, the specific selection should be determined based on the actual project requirements .]
Activation Method:
Select Install Packages under Component
Add it to/Bin/dclsockets * 0. bpl .;
XE series, which can only be seen in VCL Form after installation.