Skip to content
Browse files

Protocol.

  • Loading branch information...
1 parent b9510e4 commit 66d702a748b063758fb1387f08d2e221f2603972 @squaremo committed Apr 14, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 app.js
View
17 app.js
@@ -19,6 +19,23 @@ socks.on('connection', function(conn) {
initPlayer(conn);
});
+/*
+
+# Protocol
+# ! = send
+# ? = recv
+
+Start := !Name ?Start Game
+Game := (!Move | ?Move | Win)*
+Win := !Win ?Win
+
+Name := string
+Start := {'start': Player}
+Player := {'name': string, 'wins': int}
+
+*/
+
+
function initPlayer(connection) {
connection.on('data', function(msg) {
connection.removeAllListeners('data');

0 comments on commit 66d702a

Please sign in to comment.
Something went wrong with that request. Please try again.