Solved

Client Server Winsock

Posted on 1998-01-26
3
666 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 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