Created
September 24, 2011 18:12
-
-
Save statianzo/1239653 to your computer and use it in GitHub Desktop.
Fleck -> Behavior Chain
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 allSockets = new List<IWebSocketConnection>(); | |
var server = new WebSocketServer("ws://localhost:8181"); | |
server.Start(socket => | |
{ | |
socket.OnOpen = () => | |
{ | |
allSockets.Add(socket); | |
}; | |
socket.OnClose = () => | |
{ | |
allSockets.Remove(socket); | |
}; | |
socket.OnMessage = message => | |
{ | |
//Send message to behavior chain | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment