Solved

Client Server Winsock

Posted on 1998-01-26
3
663 Views
Last Modified: 2008-02-01
DELPHIer,

For the Socket Component, what is TServerClientThread and TCustomSocket ? And what is the differences between TClientWinSocket and TClientSocket or TServerWinSocket and TServerSocket respectively ?

Andrew
0
Comment
Question by:andrewyu
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 10 total points
ID: 1357649
Hi

The TServerClientThread is managed by TServerWinSocket components.  One thread is created for each client so that the main program's speed isn't affected.  You don't need to worry about TServerClientThreads as the TServerWinSocket manages these for you.

TCustomSocket is the base class for the socket components, i.e. TClientSocket and TServerSocket.  Similarly, TCustomWinSocket is the base class for TClientWinSocket and TServerWinSocket.  The difference between T???Socket and T???WinSocket is that the T???WinSocket components use a different set of Windows API calls (WSA...) specially developed for using sockets in Windows.  In other words, the main difference is that TClientSocket and TServerSocket use different API calls from TClientWinSocket and TServerWinSocket.

Regards,
JB
0
 

Author Comment

by:andrewyu
ID: 1357650
For TClientSocket and TClientWinSocket, which one have a higher efficiency ??????

thanks,
Andrew
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1357651
Both do.  In Delphi, the components are TClientSocket and TServerSocket (which use TClientWinSocket and TServerWinSocket internally).  If you want to use components (which is recommended) then you must use TClientSocket & TServerSocket, because the T???WinSocket components are NOT Delphi components.  When you use TClientSocket, TClientWinSocket is used internally.  Similarly, when you use the TServerSocket component, TServerWinSocket is used internally.

JB
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question