done
This commit is contained in:
+3
-10
@@ -19,12 +19,9 @@ namespace Server
|
||||
listener.Prefixes.Add("http://localhost:5000/api/reset/");
|
||||
listener.Prefixes.Add("http://localhost:5000/api/createp/");
|
||||
|
||||
// Start listening for incoming requests
|
||||
// listen
|
||||
listener.Start();
|
||||
Console.WriteLine("Server is listening on http://localhost:5000/");
|
||||
// god knows what that is
|
||||
/* Thread listenerThread = new Thread(() => */
|
||||
/* { */
|
||||
while (true)
|
||||
{
|
||||
// wait for request
|
||||
@@ -37,8 +34,7 @@ namespace Server
|
||||
MySqlConnection conn = new MySqlConnection(connectionString);
|
||||
|
||||
// url after localhost:5000/
|
||||
// i think the validation is unnecessry but the compiler has
|
||||
// more experience
|
||||
// i think the validation is unnecessry but the compiler doesn't
|
||||
string uri;
|
||||
if (request != null && request.Url != null)
|
||||
{
|
||||
@@ -74,12 +70,9 @@ namespace Server
|
||||
response.OutputStream.Write(buffer, 0, buffer.Length);
|
||||
break;
|
||||
}
|
||||
// Close the response
|
||||
// send the response
|
||||
response.OutputStream.Close();
|
||||
}
|
||||
/* }); */
|
||||
/* // Start the listener thread */
|
||||
/* listenerThread.Start(); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user