Permalink
Browse files

remove debug text, only rebrodcast valid json

  • Loading branch information...
Eric Stern
Eric Stern committed Oct 27, 2011
1 parent 7f821b6 commit 0600623cba3b20e053f6f376fb691925fefe9a08
Showing with 3 additions and 8 deletions.
  1. +3 −8 app/Client.php
View
@@ -18,9 +18,6 @@ public function __construct($socket) {
} // function __construct
public function message($message) {
- echo "Sending message:\n";
- echo $message, "\n";
-
socket_write($this->socket, new WebSocketFrame($message));
} // function message
@@ -55,7 +52,9 @@ public function handleInput() {
return;
}
$frame = WebSocketFrame::decode($input);
- // Action::perform($this, $input);
+ if (null !== $msg = json_decode($frame->payload)) {
+ Server::messageAll($frame->payload);
+ }
} // function handleInput
@@ -104,10 +103,6 @@ public function getPosition() {
} // function getPosition
public function disconnect() {
-
- echo "\n\n=======DISCONNECTED=======\n\n";
-
-
socket_close($this->socket);
Server::removeClient($this);
} // function disconnect

0 comments on commit 0600623

Please sign in to comment.