Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- WebSocket.prototype._send = WebSocket.prototype.send;
- WebSocket.prototype.send = function (data) {
- this._send(data);
- this.addEventListener('message', function (msg) {
- console.log('>> ' + msg.data);
- }, false);
- this.send = function (data) {
- this._send(data);
- console.log("<< " + data);
- };
- console.log("<< " + data);
- }
- })()
Add Comment
Please, Sign In to add comment