delphi 2010 and tclientsocket problems - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

delphi 2010 and tclientsocket problems

dose anyone know if delphi 2010 has a bug with tclientsocket as i been trying to sort a socket app and everytime i got to connect to server it will not and i get Asynchronous socket error 10060 from client.

anyone have any idears?

[code]
DM.VedosClientSocket.Address := '127.0.0.1';
DM.VedosClientSocket.Host := 'localhost';
DM.VedosClientSocket.Port := 6060;
DM.VedosClientSocket.Active := True;
[/code]

thanks
Slewis

Comments

  • djjd47130djjd47130 Posts: 7Member
    This happens when there is a problem communicating with the server, most likely the server is in-accessible. Unfortunately, that popup error message is nearly permanent, the error event doesn't catch and hide it. Instead, you need to go into the client socket's 'OnError' event and say:

    if ErrorCode = 10060 then ErrorCode:= 0;

    This catches and stops that message from appearing.
Sign In or Register to comment.