Guest User

Untitled

a guest
Sep 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. (function () {
  2. WebSocket.prototype._send = WebSocket.prototype.send;
  3. WebSocket.prototype.send = function (data) {
  4. this._send(data);
  5. this.addEventListener('message', function (msg) {
  6. console.log('>> ' + msg.data);
  7. }, false);
  8. this.send = function (data) {
  9. this._send(data);
  10. console.log("<< " + data);
  11. };
  12. console.log("<< " + data);
  13. }
  14. })()
Add Comment
Please, Sign In to add comment