key: 'send',
value: function send(msg) {
this.socket.send(JSON.stringify(msg));
}
var connect = function () {
log('connect');
var oldWs = ws;
ws = new config.constructor(url, protocols);
WebSocket connection to 'ws://www.openchat.us/chat/stream' failed: WebSocket is closed before the connection is established.
(index):170 Disconnected from chat socket
// Helpful debugging
webSocketBridge.socket.onopen = function () {
console.log("Connected to chat socket");
};
webSocketBridge.socket.onclose = function () {
console.log("Disconnected from chat socket");
}
The commands im using in the putty console is : daphne -p{} myproject.asgi:channel_layer
then i open another putty console and enter the command python manage.py runworker
but have continued to run into these problems going on 2 weeks now of this junk I want to use django channels but if the problems continue going to move on with socketio instead.
Thanks for anyone who can help