English

Google App Engine

The Channel API Functions (Python)

The Channel API provides the following functions in the module google.appengine.api.channel:

create_channel(client_id,duration_minutes=None)

Creates a channel. Returns a token for use by the JavaScript client listening on the channel.

Arguments:

client_id
An application-created string the server uses to identify individual JavaScript clients.
duration_minutes
The number of minutes for which the returned token will be valid. If none, use default (120 minutes).
send_message(client_id, message)

Asynchronously sends a message to a channel. No error is returned if the message cannot be delivered.

Arguments:

client_id
The key identifying a JavaScript client.
message
The message passed to the client.