Turn: Delphi models and models for various socket components

Source: Internet
Author: User

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

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.