public HttpResponseMessage move()
        {
            Move move = TTTUtility.readRequest <Move>();

            connection.writeByte(MOVE);
            connection.writeInt(move.x);
            connection.writeInt(move.y);
            return(Request.CreateResponse(HttpStatusCode.Accepted));
        }
 private void startConnection(bool withAI)
 {
     if (connections.ContainsKey(key()))
     {
         connections[key()].Dispose();
         connections.Remove(key());
     }
     try {
         tryConnect(2);
         return;
     }
     catch (SocketException) {
         TTTUtility.startJavaServer(withAI);
     }
     tryConnect(5);
 }
 public string start()
 {
     TTTUtility.startJavaServer(false);
     return("started server");
 }
 public string startAI()
 {
     TTTUtility.startJavaServer(true);
     return("started server - with AI");
 }
 public string kill()
 {
     TTTUtility.stopJavaServer();
     return("'pls dont kill me' - the server you just killed.");            // ha
 }