Skip to content

Instantly share code, notes, and snippets.

View markomitranic's full-sized avatar
🧀
Cheese mode!

Marko Mitranic markomitranic

🧀
Cheese mode!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am markomitranic on github.
  • I am markomitranic (https://keybase.io/markomitranic) on keybase.
  • I have a public key whose fingerprint is 68CF 270C 566B CB39 8DC5 6200 7355 9A15 03E7 DB25

To claim this, I am signing this object:

@markomitranic
markomitranic / client.js
Created July 16, 2018 16:08
Basic WebSocket Ping-Pong Implementation
var socket = new WebSocket('ws://localhost:8080');
socket.addEventListener('error', function(message) {
console.log('Wow guy, there was an eror.');
console.log('Heres the message:', message);
});
socket.addEventListener('open', function(message) {
console.log('Open now!!');
console.log('Heres the message:', message);