Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to combine TIdTCPServer components with TClientSocket ?
#1
Hello. I am using Embarcadero C++ and I have Indy 10.6.2.0 installed.

I have 4 components on my form:

TIdTCPClient *Client;
TIdTCPServer *Server;

TClientSocket *ClientSocket;
TServerSocket *ServerSocket;

Client is configured to connect to Server;
ClientSocket is configured to connect to ServerSocket;

If I assign ClientConnect() to Button1::OnClick event, it connects successfully.

If I assign ClientSocket->Active=true to Button2::OnClick event, it also connects successfully.

However, if I try to connect by setting ClientSocket->Active=true in Server::OnConnect event:
{
ClientSocket->Active=true;
}

It doesn't work. The same is true if I try to connect in OnContextCreate or OnExecute events.

Why is this happening?
Reply


Messages In This Thread
Is it possible to combine TIdTCPServer components with TClientSocket ? - by Max2009 - 03-20-2023, 06:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)