public static void resetVirables(AsyncResult current) { Game = null; clients.Clear(); lock_ = new object(); System.Diagnostics.Debug.WriteLine("reset all static virables"); if (current != null) { current.CompleteRequest(); } }
public static void Remove(string guID, AsyncResult current) { lock (lock_) { AsyncResult client = clients.Find (delegate(AsyncResult cs) { return(cs.ClientGuid == guID); }); if (client != null) { clients.Remove(client); } current.CompleteRequest(); } }
private static void sendMessage(AsyncResult current, String message) { if (current != null || current._context.Session != null) { current._context.Response.Write(message); current.CompleteRequest(); System.Diagnostics.Debug.WriteLine("posted : " + message); } else { System.Diagnostics.Debug.WriteLine("Null session Cannot print to client"); } }