I'm going through the docs and chat example but from browser I can see messages are going through AJAX and receiving over web socket.
user_chat.html
// send message to the server using Ajax
function sendMessage() {
$.post('{% url "user_chat" %}', {
user: $('#user').val(),
message: $('#text_message').val()
});
}
// receive a message though the Websocket from the server
function receiveMessage(msg) {
billboard.append('<br/>' + msg);
billboard.scrollTop(billboard.scrollTop() + 25);
}
Hi,
I'm going through the docs and chat example but from browser I can see messages are going through AJAX and receiving over web socket.
user_chat.html
// send message to the server using Ajax function sendMessage() { $.post('{% url "user_chat" %}', { user: $('#user').val(), message: $('#text_message').val() }); }