mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-09 04:23:01 -05:00
Console log all SockJS I/O
Previously, we only logged non-lobby server->client messages, but since lobby is no longer on default autojoin, it makes sense to just log everything. Useful to anyone who wants to learn more about how PS's protocol works.
This commit is contained in:
parent
626a2eef2d
commit
723803b57f
|
|
@ -648,8 +648,8 @@
|
|||
}
|
||||
};
|
||||
this.socket.onmessage = function(msg) {
|
||||
if (window.console && console.log && (Config.server.id !== 'showdown' || msg.data.charAt(0) !== '|')) {
|
||||
console.log('received: '+msg.data);
|
||||
if (window.console && console.log) {
|
||||
console.log('<< '+msg.data);
|
||||
}
|
||||
if (msg.data.charAt(0) !== '{') {
|
||||
self.receive(msg.data);
|
||||
|
|
@ -711,6 +711,9 @@
|
|||
this.sendQueue.push(data);
|
||||
return;
|
||||
}
|
||||
if (window.console && console.log) {
|
||||
console.log('>> '+data);
|
||||
}
|
||||
this.socket.send(data);
|
||||
},
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user