Most of Delphi's books do not mention the Delphi's various socket communication module models and models, and some books only explain the Windows Socket mode and model, and did not summarize the models adopted by various components, so our programmers do not know how to choose, Only know a component good, why good, how to use it does not know.
The author gives a summary of these components, as follows:
Component |
Unit |
Depend on |
Mode |
Model |
webapp/cgi |
Sockapp.pas |
Indy |
Blocking/non-blocking |
Select |
Indy |
|
|
Blocking/non-blocking |
Select |
Ics |
Overbyteicswsocket.pas |
|
Non-blocking |
Wmasyncselect |
Ttcpserver/ttcpclient |
Sockets.pas |
|
Blocking/non-blocking |
Select |
Realthinclient |
|
ICS variants |
Non-blocking |
WSAAsyncSelect |
Synapse |
Blcksock.pas |
|
Blocking/non-blocking |
Select |
Tserversocket Tclientsocket |
Scktcomp.pas |
|
Blocking/non-blocking |
WSAAsyncSelect |
Fastnet |
Psock.pas |
|
|
WSAAsyncSelect |
Tsocketconnection |
|
Tserversocket Tclientsocket |
|
|
As you can see from the table above, none of the components use the following 4 models:
Blocking mode
Overlapping ports
Event Selection
Completion port
are only used:
Select
WSAAsyncSelect
Both of these models, which use the WSAAsyncSelect model, are bound to require windows that do not have many components to service.
Let's analyze what models are used by various server-side programs:
Software |
Model |
Apache 2 |
Iocp Select |
Mysql 5 |
Select |
Erlang |
Select WSAEventSelect |
Legend |
The server uses Tserversocket, which is windowed. |
Summary: Only Indy and synapse are suitable for the service side without Windows. It is also good to have the service side of the model of developing IOCP.
Turn: Delphi models and models for various socket components