Moved SocketConnection to its own module

This commit is contained in:
Tristan B. Velloza Kildaire 2021-12-26 12:01:53 +02:00
parent 713d3a6a39
commit 093211f7f9
2 changed files with 29 additions and 25 deletions

View File

@ -1,5 +1,5 @@
/**
*
* Connection handling sub-system
*/
module dnetd.connection.connection;
@ -26,27 +26,3 @@ public abstract class Connection : Thread
*/
public abstract void handler();
}
import std.socket;
/**
* FIXME: When we do anything so far, I am assuming
* a streaming socket so we shouldn't let the
* SocketListener use any SocketType that isn't STREAM
*/
public final class SocketConnection : Connection
{
private Socket clientSock;
this(Socket socket)
{
clientSock = socket;
}
public override void handler()
{
while(true)
{
}
}
}

View File

@ -0,0 +1,28 @@
/**
* Socket-based connection handler sub-system
*/
import dnetd.connection.connection : Connection;
import std.socket;
/**
* FIXME: When we do anything so far, I am assuming
* a streaming socket so we shouldn't let the
* SocketListener use any SocketType that isn't STREAM
*/
public final class SocketConnection : Connection
{
private Socket clientSock;
this(Socket socket)
{
clientSock = socket;
}
public override void handler()
{
while(true)
{
}
}
}