Fixed compilation errors

This commit is contained in:
Tristan B. Kildaire 2020-11-03 10:36:28 +02:00
parent 41d758c46a
commit 878a59920b
1 changed files with 8 additions and 5 deletions

View File

@ -4,6 +4,9 @@ import std.socket;
public final class DListener
{
/* The socket */
private Socket socket;
/**
* Creates new listener with the associated server
* and the given Add
@ -11,16 +14,16 @@ public final class DListener
*/
this(AddressInfo addressInfo)
{
/* Get the Address */
Address address = addressInfo.address;
// /* Get the Address */
// Address address = addressInfo.address;
/* TODO: Check AF_FAMILY (can only be INET,INET6,UNIX) */
/* TODO: Check SocketType (can only be STREAM) */
/* TODO: Check Protocol, can only be RAW (assuming UNIX) or TCP */
/* address.addressFamily, addressInfo.type, addressInfo.protocol */
/* Create the Socket */
socket = new Socket();
socket.bind(address.addressFamily, addressInfo.type, addressInfo.protocol);
/* Create the Socket and bind it */
socket = new Socket(addressInfo);
}
}