0
votes

I'hv been trying to learn the Google App Engine's Channel API lately.

I tried to make a simple chat app, but I am reaching problems.

This is generally what i have done.

server opens a static channel:

token = channel.create_channel('bigboys')

client js connect to channel with:

var channel = new goog.appengine.Channel(token)

I am not using Google App Engines users. I don't want clients to have to login.

So my problem is, the chat app doesn't really work, only one client can join the channel. I know there is a one client ID per channel rule. So how do I support multiple clients in one "chat room"?

1

1 Answers

7
votes

Think of a channel being the connection between one client (browser) and your server.

If you have a chatroom, you'll need a channel for each client. You'll need something on the server side to keep track of all the clients in the chatroom, and the channel for each client. When you send a message, you'll need to send it on every client channel in the chatroom.