Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 31-03-2013
Avatar de fenixariel
fenixariel fenixariel is offline
Miembro
 
Registrado: mar 2007
Posts: 77
Poder: 18
fenixariel Va por buen camino
Código Delphi [-]

procedure TForm1.IdTCPServer1Connect(AContext: TIdContext);
begin
    Memo1.Lines.Add(DateTimeToStr(now) + ' ' + 'Connectado a : ' + AContext.Binding.PeerIP + '- Port:' + IntToStr(AContext.Binding.Port));
end;

procedure TForm1.IdTCPServer1Disconnect(AContext: TIdContext);
begin
    Memo1.Lines.Add(DateTimeToStr(now) + ' ' + 'Desconectado de : ' + AContext.Binding.PeerIP + '- Port:' + IntToStr(AContext.Binding.Port));
end;

procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
var
    Command: string;
    Size: integer;
    textoRecibido: string;
begin
    if AContext.Connection.Connected then
    begin
       
          Command := '';
          Command := AContext.Connection.Socket.ReadLn;
   
          Size := AContext.Connection.IOHandler.ReadLongInt(true);
          textoRecibido := AContext.Connection.IOHandler.ReadString(Size);
          AContext.Connection.IOHandler.WriteLn('Enviado');         
       
          Memo1.Lines.Add(DateTimeToStr(now) + ' - ' + AContext.Binding.PeerIP + ' : ' + Command);
    end;
end;


Probe enviandole mensajes desde Hercules tambien, pero solo puedo ver el momento que se conecta o desconecta el cliente pero no asi los datos enviados.



Saludos.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Server TCP con Indy desde una PC en Red. FENIXadr Internet 5 03-07-2011 16:53:48
Problema al detener Indy TCP Server anakin1981 Varios 0 26-07-2010 20:31:09
Problema FTP Server con Indy jusnjosesch Internet 1 24-07-2008 03:05:02
Time Server Indy pablonill Servers 0 02-04-2008 14:19:52
Indy TCP Server: Uso de CPU 100% tras 5 min JARivera Internet 12 28-12-2007 15:41:27


La franja horaria es GMT +2. Ahora son las 17:09:08.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi