client/server problem

Hi everyone.
Sorry for my English... So I am writing a client/server program and I would like to send a command that will be exexuted on the remote client with system(); or createprocess(). I have created a simple indy client/server connection and where I send a line of text that I would like to be executed...

I work with C++ Builder.

Any suggestions?

1
2
3
4
5
  void __fastcall TForm2::IdTCPServer1Execute(TIdContext *AContext)
{
	int length = AContext->Connection->Socket->ReadLongInt();
	UnicodeString Command = AContext->Connection->Socket->ReadString(length);
	AContext->Connection->Disconnect();
Topic archived. No new replies allowed.