Solved

Client Server Winsock

Posted on 1998-01-26
3
668 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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