1
0
mirror of https://github.com/deavminet/dnetd synced 2024-09-21 09:43:37 +02:00
dnetd_old/source/dnetd/dconnection.d

44 lines
643 B
D
Raw Normal View History

2020-09-23 09:37:18 +02:00
/**
* dconnection
*
* Client/server connection handler spawned
* by socket connection dequeue loop.
*
* Handles all interactions between
* the server and the specific client/server.
*/
module dnetd.dconnection;
import core.thread : Thread;
import std.socket : Socket;
public class DConnection : Thread
{
/* The client's socket */
private Socket socket;
this(Socket socket)
{
/* Set the function to be called on thread start */
super(&worker);
/* Set the socket */
this.socket = socket;
/* Start the connection handler */
start();
}
/**
* Byte dequeue loop
*/
private void worker()
{
while(true)
{
}
}
}