Delphi
--
Questions
--
Followers
Top Experts
Also, i'm using commandhaldle from the component TidCmdTcpServer/TidCmdTcpC
The client side sometimes need's send message to the server.
This will be like this: The server controls a lot user, sending message to the clients like close windows, or shutting down the pc, or blocking the user from using the pc, but that's not the problem
1) The client received the messages from the server normally, but sometimes when the user do some kind of active on the machine, than it has to send a message to the server telling what happening, but I don't know how to send message back to the server.
2) Handle the server about wich is the right client to send message.
3) How to do broadcast using this command, I'm meam, how to send message to all pc's connected on the server.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
As an alternatvie for the broadcast check out Indy UDP at these links.
http://delphi.about.com/library/weekly/aa101105a.htm
http://delphi.about.com/od/adptips2005/qt/udpvstcp.htm
//////////////////////////
Type
PConexao = ^TConexao;
TConexao = record
IP, User, Maq, Ver, PathInstall : ShortString;
Client : ??????????/ what type will be here???
end;
//////////////////////////
procedure TFPrinc.IdCmdTCPServer1Con
begin
{ THESE TWO LINES ARE CRITICAL TO MAKING WORK WITH SSL! }
if (AContext.Connection.IOHan
begin
TIdSSLIOHandlerSocketBase(
end;
//when the client connects
ConAux.IP := AContext.Connection.Socket
ConAux.Client := ?????????? That's where i will handle to msg back?
end;
Maybe will be: ConAux.Client := Acontext;?????, but that's not work, I test already






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Procedure TFPrinc.SendAll(msg : string);
var
i: integer;
ConAux: PConexao;
begin
for i:= 0 to conn.Count -1 do
begin
ConAux := PConexao(conn[i]);
?????Send message here, don't know the command???????
end;
End;

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
the only thing that i'm finding that maybe can be something, lol. Is this function:
IdCmdTCPServer1.IOHandler.
waiting answering...






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Delphi
--
Questions
--
Followers
Top Experts
Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.