Log outgoing messages
This commit is contained in:
parent
67ca372657
commit
021a5009d5
1 changed files with 2 additions and 1 deletions
|
@ -194,7 +194,7 @@ function connect() {
|
||||||
|
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
var msg = parseMessage(event.data);
|
var msg = parseMessage(event.data);
|
||||||
console.log(msg);
|
console.log("Received:", msg);
|
||||||
|
|
||||||
switch (msg.command) {
|
switch (msg.command) {
|
||||||
case RPL_WELCOME:
|
case RPL_WELCOME:
|
||||||
|
@ -273,6 +273,7 @@ function disconnect() {
|
||||||
|
|
||||||
function sendMessage(msg) {
|
function sendMessage(msg) {
|
||||||
ws.send(formatMessage(msg));
|
ws.send(formatMessage(msg));
|
||||||
|
console.log("Sent:", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
function executeCommand(s) {
|
function executeCommand(s) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue