2011-03-29 114 views
0

首先,我不太熟悉restlets,剛開始。我想實現一個廣播聊天室,其中發送消息的客戶端將消息廣播給所有其他客戶端。使用Restlet api實現聊天服務

My attempt was to use a resource on the server side where the client would send the message(as a String) using POST. The other clients would constantly have to poll this resource to receive the message. I know this method must be horribly ineffective. 

    I was wondering if there was a better method where a change on the server side(in this case the sending of the string message) would result in the server alerting the clients of this update. 

回答