1
0
mirror of https://github.com/deavminet/dnetd synced 2024-09-21 17:53:39 +02:00

Added debug print for the address the listener's socket is bound to

This commit is contained in:
Tristan B. Kildaire 2020-11-03 10:41:32 +02:00
parent 2badd2d302
commit 727d42fa67

View File

@ -4,6 +4,8 @@ import std.socket;
import dnetd.dserver; import dnetd.dserver;
import core.thread; import core.thread;
import dnetd.dconnection; import dnetd.dconnection;
import gogga;
import std.conv : to;
public final class DListener : Thread public final class DListener : Thread
{ {
@ -28,6 +30,7 @@ public final class DListener : Thread
// Address address = addressInfo.address; // Address address = addressInfo.address;
/* TODO: Check AF_FAMILY (can only be INET,INET6,UNIX) */ /* TODO: Check AF_FAMILY (can only be INET,INET6,UNIX) */
/* TODO: Check SocketType (can only be STREAM) */ /* TODO: Check SocketType (can only be STREAM) */
/* TODO: Check Protocol, can only be RAW (assuming UNIX) or TCP */ /* TODO: Check Protocol, can only be RAW (assuming UNIX) or TCP */
@ -35,6 +38,7 @@ public final class DListener : Thread
/* Create the Socket and bind it */ /* Create the Socket and bind it */
serverSocket = new Socket(addressInfo); serverSocket = new Socket(addressInfo);
gprintln("New listener started with address "~to!(string)(addressInfo));
/* Start the connection dequeue thread */ /* Start the connection dequeue thread */
start(); start();