Skip to content

Instantly share code, notes, and snippets.

@castaneai
Created March 5, 2013 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save castaneai/5092694 to your computer and use it in GitHub Desktop.
Save castaneai/5092694 to your computer and use it in GitHub Desktop.
class Chat {
public string Name { get; set; }
public string Message { get; set; }
}
var server = new JsonOnline.Server();
server.OnAccept += (client) => {
client.On<Chat>((_, chat) => {
client.Broadcast(chat);
});
};
server.Listen(IPAddress.Any, 8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment