1
0
Fork 0
mirror of https://github.com/besterprotocol/besterd synced 2023-12-13 21:00:32 +01:00

Create server with hardcoded AF_INET4 bind address and TCP port

This commit is contained in:
Tristan B. Kildaire 2020-04-16 16:35:07 +02:00
parent 7f41ab4f71
commit e53fd120ed
2 changed files with 14 additions and 2 deletions

View file

@ -1,9 +1,13 @@
module app;
import std.stdio;
import server.server;
import server.types;
void main()
{
writeln("Edit source/app.d to start your project.");
/* TODO: Change this */
string address = "0.0.0.0";
ushort port = 2222;
BesterServer server = new BesterServer(address, port);
}

View file

@ -1,6 +1,14 @@
module server.types;
import utils.debugging : debugPrint;
import std.conv : to;
public class BesterServer
{
this(string bindAddress, ushort listenPort)
{
debugPrint("Binding to address: " ~ bindAddress ~ " and port " ~ to!(string)(listenPort));
}
}