使用restletapi实现聊天服务
首先,我对restlet不太熟悉,只是刚刚开始。我想实现一个广播聊天室,在这个聊天室中,发送消息的客户端会将消息广播给所有其他客户端使用restletapi实现聊天服务,restlet,chatroom,Restlet,Chatroom,首先,我对restlet不太熟悉,只是刚刚开始。我想实现一个广播聊天室,在这个聊天室中,发送消息的客户端会将消息广播给所有其他客户端 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 t
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.
2.1版中会有一些新的nio连接器。在Web页面中,您可以考虑使用诸如慧星或HTML5 Web套接字之类的技术。 请参见Restlet开发者wiki中的规范页面: 蒂埃里