[AWS] AWS.Server.Push.Client_Gone

Dmitriy Anisimkov anisimkov at ada-ru.org
Fri Aug 12 06:39:22 CEST 2011


On 08/12/2011 03:44 AM, Joseph Montanez wrote:
> When you use Send you have the option of specifying the function for
> Client_Gone. When you Send_To, you don't. However it should raise an
> exception of Client_Gone. It's never raised the exception for me which
> is weird. However I am trying to figure out how know when I client
> disconnect if I am not using Send ()
When using "Send", you could know about client disconnect by Client_Gone 
callback.
When using "Send_To", you could know about client disconnect by 
Client_Gone exception.

If you think that Client_Gone callback or Client_Gone exception is not 
arrived on the Client disconnet,
write the small programm with client and server inside showing this error.

I'm using both of this routines and do not miss client disconnects.

> So I tried:
>
>                begin
>                   Chat.Send_To (
>                                 Server       =>  SP,
>                                 Client_Id    =>  Connection_Id,
>                                 Data         =>  Data,
>                                 Content_Type =>  "text/html"
>                                );
>                   --  Chrome requires us send a zero byte response
>                   --  To end the chunked data stream correctly...
>                   Chat.Send_To (
>                                 Server       =>  SP,
>                                 Client_Id    =>  Connection_Id,
>                                 Data         =>  To_Unbounded_String (""),
>                                 Content_Type =>  "text/html"
>                                );
>                   --  Force a disconnect, to allow them to reconnect for other
>                   --  messages
>                exception when AWS.Server.Push.Client_Gone =>
>                      Clients.Delete (Position =>  Session_Index);
>                end;
>
> How I end up getting:
> -----------------------------------------------
> invalid prefix in selected component "PUSH"
> exception name expected
> -----------------------------------------------
>
>
> --
> Joseph Montanez
> Web Developer
> Gorilla3D
> Design, Develop, Deploy
> _______________________________________________
> AWS mailing list
> AWS at lists.adacore.com
> /no-more-mailman.html



More information about the AWS mailing list