mirror of https://github.com/deavminet/dnetd-ng
Moved SocketConnection to its own module
This commit is contained in:
parent
713d3a6a39
commit
093211f7f9
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue