This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function maybe(fn) { | |
try { | |
return fn(); | |
} catch(error) { | |
if (error instanceof TypeError) { | |
return undefined; | |
} | |
throw error; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ws = require('ws'), | |
nconf = require('nconf'), | |
redis = require('redis'); | |
nconf.argv() | |
.env(); | |
var server = new ws.Server({port: nconf.get('PORT')}); | |
var sockets = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
import com.worlize.websocket.WebSocket; | |
import com.worlize.websocket.WebSocketEvent; | |
import com.worlize.websocket.WebSocketErrorEvent; | |
public class Main extends Sprite |