Home > Back-end >  Delphi TServerSocket, TClientSocket communication problems
Delphi TServerSocket, TClientSocket communication problems

Time:10-18

I use TServerSocket, TClientSocket realize communication, server deployment to the outside network, found that for the first time to send data to the server will take a long time before the server receives the nearly more than 10 seconds and send back as if will soon receive this how can handle can be solved? After the test is not a network problem, I through IdTCPServer this communication control can quickly received the client's message,

Two kinds of control are tested, is the most simple example, connect to the server and then sends a string message! Under the guidance of, very thank you!

Because TServerSocket has made some of the things, so don't want to change my control!

CodePudding user response:

TServerSocket controls is not recommended, recommended for TIdTCPServer, the better

CodePudding user response:

reference 1st floor SQLDebug_Fan response:
TServerSocket is not recommended to use the controls, Suggestions for TIdTCPServer, the better


TIdTCPServer really didn't find the right example, however, the client is not receiving the server sent message with events, according to the Internet through the threads to receive, but, as a result of any operation after login procedure can't response, in a state of suspended animation

CodePudding user response:

For the first time will be slow.. Normal phenomenon.
  • Related