NaZguL wrote:
> Hello, All!
> 
>     When client connected to HTTPserver from ICS, the HTTPserver create
> WSocket-thread for this client. Yes?

A thread is not created by the component. ICS is working asynchronous
see: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm

> Then for new client HTTPserver will create a new WSocket-thread. Am I
> right? 

No

> So, how I can get access to thread of client, who [client] have
> some specific data (for example, IP, Port etc)?
> E.g. I want disconnect some client with some IP. How I cam do it?

You have access to connected clients thru property Client[Index].
for I := 0 to Httpserver1.ClientCount -1 do
    if Httpserver1.Client[I].GetPeerAddr = '192.168.1.1' then
    begin
        HttpServer1.Client[I].CloseDelayed;
        Exit;
    end;


Or use event OnClientConnect:

procedure TForm1.HttpServer1ClientConnect(Sender, Client: TObject; Error: Word);
begin
    with Client as THttpConnection do
    begin
        if GetPeerAddr = '192.168.1.1' then
            CloseDelayed;
    end;   
end;


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


> 
> With best regards, NaZguL.  E-mail: [EMAIL PROTECTED]
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to