IdTCPServer怎么样主动跟指定客服端发送数据?
不在OnExecute事件里面发送,代码如下:
TList *ListA;
int i;
ListA =IdTCPServer1->Threads->LockList();
for(i=0;i<ListA->Count;i++)
{
try
{
TIdPeerThread(ListA->Items[i])->Connection->WriteLn("Thread OK");
}
__finally
{
}
}
IdTCPServer1->Threads->UnlockList();
现在这句不能编译通过,
TIdPeerThread(ListA->Items[i])->Connection->WriteLn("Thread OK");
错误: [C++ Error] Unit1.cpp(287): E2288 Pointer to structure required on left side of -> or ->*
求教大家,谢谢.