![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#2
|
|||
|
|||
![]() Hola Buenas tardes...
Anexo el código en C++ Builder, para hacerlo en Delphi cambia el (->) por (.) //------------------------------------------------------------------------ bool Enviar_CNT(AnsiString IP,AnsiString Mensaje) { bool Envio = false; int Cont; TList *Listado = new TList(); Listado = IdTCPServer1->Threads->LockList(); TIdPeerThread* Temp; try { for (Cont = 0; Cont < Listado->Count; Cont++) { Temp = (TIdPeerThread*)Listado->Items[Cont]; if (Temp->Connection->Socket->Binding->PeerIP == IP) { Temp->Connection->Write(Mensaje); Envio = true; break; } } } __except(1) { Temp->Stop(); IdTCPServer1->Threads->UnlockList(); } IdTCPServer1->Threads->UnlockList(); return Envio; } //------------------------------------------------------------------------ |
|
|
![]() |
|