Hi.
I'm trying to implement chat on my GWT app. So client has getEvents()
function implemented like this :
public void getEvents( )
{
networkSvc.getEvents(
new AsyncCallback< ArrayList<Event> >()
{
public void onSuccess( ArrayList< Event >
events )
{
handleEvents( events );
networkSvc.getEvents( this );
}
public void onFailure( Throwable caught )
{
System.out.println("eventListner " +
caught );
}
}
);
}
This func in an endless loop with the server .
at the server side getEvents goes to sleep for 30 sec or till events
approaching.
The second function is sendEvent() function.
As i see, i can't send an event to server while the server processing
the previos request.
I mean it looks like the sendEvent() waits till the getEvents() gets
the response,
and just after that it sends its own request.
Is that right, or there is some bug in my algorithm ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---