procedure. Tfm_main Button1Click (Sender: TObject);
Var
MessageID: Integer;
ThisMessage: String;
ReceivedString: String;
The begin
UDPClient. Send (' ABC ');//use this sentence to send,
ReceivedString:=UDPClient ReceiveString ();//use this sentence to receive
The end;
The communication is no problem, but I think the functions as follows:
Has A and B two client, there is A S the service side, in order to realize A through S sending message to B, now the problem is, TIdUDPClient did this control can receive instant server, the method of sending information now receiving, by A Timer control code is as follows:
procedure Tfm_main. Timer1Timer (Sender: TObject);
Var
ReceivedString: string;
The begin
If not vconetion then
exit;
ReceivedString:=UDPClient ReceiveString ();
If ReceivedString & lt;> "' then
The begin
UDPMemo. Lines. The Add (+ ReceivedString Received:);
The end;
The end;
But such a good card, also not reality, I want to ask, how to solve this problem, when the server sends the information to respond?
thank you
CodePudding user response:
IdUDPserver read attributes, data receiving, not receivingCodePudding user response:
I know, but my client is using this IdUDPClient control,CodePudding user response: