hola manuc perdon por responder hasta ahora peor me habian asignado otras tareas sabes he estado haciendo pruebas sobre la red, y los sockets abren y cierran perfectamente pero al devolver por el hilo el mensaje de que el procedimiento se llevo acabo bien nunca ejecuta ningun query ni devuelve le mensaje, es justo en este pedazo de codigo, me podrias orientar si es que me hace falta algo, este codigo lo tome del ejemplo de IdTCPDemo, gracias
Código Delphi
[-]
procedure TFrm_Interfaces.ServerExecute(AThread: TIdPeerThread);
var
ActClient, RecClient: PClient;
CommBlock, NewCommBlock: TCommBlock;
RecThread: TIdPeerThread;
i: Integer;
begin
if not AThread.Terminated and AThread.Connection.Connected then
begin
AThread.Connection.ReadBuffer (CommBlock, SizeOf (CommBlock));
ActClient := PClient(AThread.Data);
ActClient.LastAction := Now;
CreaAdo(CommBlock.MyUserName, CommBlock.nombre, CommBlock.acode, CommBlock.estado);
Protocol.Lines.Add (TimeToStr(Time)+' The process for '+CommBlock.MyUserName+' was done '); NewCommBlock.Command := 'DIALOG'; NewCommBlock.MyUserName := '[PBX Server]'; NewCommBlock.Msg := 'The process was done '; NewCommBlock.ReceiverName := '[return-to-sender]';
AThread.Connection.WriteBuffer (NewCommBlock, SizeOf (NewCommBlock), true); end;
end;