private void button1_Click(object sender, EventArgs e) { if (!server.IsRunning) { server.Start(); button1.Text = "Stop"; } else { button1.Text = "Start"; server.Stop(); } }
void StartServer() { SonicHttpServer sonicHttpServer = new SonicHttpServer(9595); sonicHttpServer.OnConnection += SonicHttpServer_OnConnection; sonicHttpServer.Start(2); }