Set bind details, address type, sock flow type and protocol typep

This commit is contained in:
Tristan 🅱. Kildaire 2020-09-23 21:49:56 +02:00
parent e2b0ec0846
commit c031db0ca2
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
module dnetd.dserver;
import core.thread : Thread;
import std.socket : Address, Socket;
import std.socket : Address, Socket, AddressFamily, SocketType, ProtocolType;
import dnetd.dconnection;
import dnetd.dchannel;
import std.string : cmp;
@ -71,7 +71,7 @@ public class DServer : Thread
private void initNetwork()
{
/* Create the socket */
serverSocket = new Socket();
serverSocket = new Socket(AddressFamily.INET, SocketType.STREAM, ProtocolType.TCP);
/* Bind the socket to the given address */
serverSocket.bind(sockAddress);