Home > Back-end >  Delphi with indy tcpclient and tcpserver problem
Delphi with indy tcpclient and tcpserver problem

Time:10-18

Delphi with indy tcpclient sent two structure,
Idtcpclient1. WriteBuffer (login, sizeof (login), true);//send the login information
IdTCPClient1. WriteBuffer (regist, sizeof (regist), true);//send the registration information
How to write I want to be in idtcpserver OnExecute events to handle respectively two requested information


I wrote
Procedure TForm2. IdTCPServer1Execute (AThread: TIdPeerThread);
Var
Login: TLogin;
Regist: TRegister;
The begin
Athread. Connection. ReadBuffer (login, sizeof (login));//receive login request
Athread. Connection. ReadBuffer (regist, sizeof (regist));//to accept the registration request,
,,,,,,, (to handle the login and regist code and receipt to tcpclient code)
end;

CodePudding user response:

Does nobody know?

CodePudding user response:

Now all indy 10,,
Many simple indy program on the network, you can Google it

CodePudding user response:

I also encountered such a problem, it seems not very good way to oh
Use indy10 send different structure, and this is not the same?
Is not to unify the two structure of bai

CodePudding user response:

I suggest you to log on to a port to register a port. Used separately
  • Related