- Cleaned up whitespace
- Added missing header documentation for the `Server` constructor
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-27 18:36:42 +02:00
parent 63b63c72c8
commit d453c16ad5

View File

@ -43,11 +43,12 @@ public class Server
private Connection[Connection] connections; private Connection[Connection] connections;
/** /**
* TODO * Constructs a new server listening on the given
* network parameters
* *
* Params: * Params:
* bindAddresses = * bindAddresses = list of addresses to bind to
* bindPort = * bindPort = port to bind to
*/ */
this(string[] bindAddresses, ushort bindPort) this(string[] bindAddresses, ushort bindPort)
{ {
@ -104,13 +105,16 @@ public class Server
connections[newConnection] = newConnection; connections[newConnection] = newConnection;
} }
/**
* Removes the provided connection from the connection queue
*
* Params:
* existingConnection = the connection to remove
*/
public final void delConnection(Connection existingConnection) public final void delConnection(Connection existingConnection)
{ {
connections.remove(existingConnection); connections.remove(existingConnection);
} }
} }