public static void Main(string[] args) { var prefix = "http://*:31337/"; var s = new ServerRepo (prefix, typeof(Tweet).Assembly); s.Start (); Console.WriteLine ("Bound to " + prefix); Console.WriteLine ("Hit Return to exit"); Console.ReadLine(); }
public Server(ServerRepo repo, string prefix) { _repo = repo; _prefix = prefix; }
public ClientHandler(string clientId, ServerRepo repo) { _repo = repo; ClientId = clientId; var streamThread = new System.Threading.Thread((System.Threading.ThreadStart)delegate { StreamLoop(); }); streamThread.Start(); Console.WriteLine (ClientId + " started streaming thread"); }