Ver Mensaje Individual
  #16  
Antiguo 27-07-2010
Avatar de richy08
richy08 richy08 is offline
Miembro
 
Registrado: may 2007
Ubicación: Bucerias, Nayarit Mexico
Posts: 529
Reputación: 20
richy08 Va por buen camino
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;  // update the time of last action

    CreaAdo(CommBlock.MyUserName, CommBlock.nombre, CommBlock.acode, CommBlock.estado);

    Protocol.Lines.Add (TimeToStr(Time)+' The process for '+CommBlock.MyUserName+' was done ');// # Confirm'+inttostr(CommBlock.nconf));
    NewCommBlock.Command := 'DIALOG';       // the message should popup on the client's screen
    NewCommBlock.MyUserName := '[PBX Server]';  // the server's username
    NewCommBlock.Msg := 'The process was done  ';  // the message to show
    NewCommBlock.ReceiverName := '[return-to-sender]'; // unnecessary
                                                                                                                                           
    AThread.Connection.WriteBuffer (NewCommBlock, SizeOf (NewCommBlock), true);  // and there it goes...
  end;
end;
Responder Con Cita