Sorry to keep adding to this, but I thought I should add the log of the connect/disconnect problem:
2011-07-04 03:57:44.424 /_ah/channel/disconnected/ 200 237ms 38cpu_ms 0kb I 2011-07-04 03:57:44.421 com.firstlightapps.MyApp.ChannelDisconnectedServlet doPost: client DISCONNECTED from channel: log 2011-07-04 03:57:02.188 /_ah/channel/connected/ 200 12ms 0cpu_ms 0kb I 2011-07-04 03:57:02.185 com.firstlightapps.MyApp.ChannelConnectedServlet doPost: client ID 'log' connected to channel You can see that it immediately disconnects. Any way I can get more info on why it is disconnecting immediately? Is it because I'm using a ClientID that is already associated with a channel? On Jul 4, 1:11 am, ksafez216 <[email protected]> wrote: > So, the Channel Presence feature actually notifies when a channel is > connected/disconnected as opposted to created/destroyed? > > If this is correct, then how can I find out when the channel that was > created on the server-side has been closed and not simply > disconnected? > > I guess I'm confused about creating vs. connecting and destroying vs. > disconnecting > > Here's what I'm doing: > > * Client requests a token using "client ID" > * If "client ID" already has a token (this info is saved in the > datastore when the channel is created server-side) THEN send the > client the token, and call channel.open(token) on client-side > * If "client ID" doesn't have a token (meaning the info doesn't exist > in the datastore), then create a new channel and send client the > token, which in turn calls channel.open(token) > * When Channel Presence detects a disconnect, delete the info stored > in the datastore (this is maybe where I've gone wrong, since the > channel is not destroyed, but simply disconnected) > > Thank you for your help. > > On Jul 3, 11:24 pm, "Nick Johnson (Google)" <[email protected]> > wrote: > > > > > Hi, > > > On Mon, Jul 4, 2011 at 3:49 PM, ksafez216 <[email protected]> wrote: > > > When I call channel.open([token]) it opens a new channel and the > > > Channel Presence feature detects this. > > > > Then, the client's browser is shut down for a few minutes and is > > > restarted. > > > > My app checks to see if they still have a valid token. If so, the > > > client calls channel.open([token]), using the same token. > > > > Again, the Channel Presence listener detects that a channel was > > > connected. > > > > Now, am I charged for two channels being open, even though it's using > > > the same client ID and token? > > > Every time you call channel.create on the server, a new channel is created, > > and a new token is returned. Billing only happens for server-side actions. > > > -Nick Johnson > > > > The thing is I don't get a channel disconnected notification, I only > > > get the two channel connected notifications. > > > > I'm just trying to figure out exactly what happens when I call > > > channel.open([token]) in the client TWICE using the same token. How > > > am I charged? > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Google App Engine" 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-appengine?hl=en. > > > -- > > Nick Johnson, Developer Programs Engineer, App Engine -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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-appengine?hl=en.
