mirror of
https://github.com/deavminet/libdnet.git
synced 2025-03-11 06:27:37 +00:00
Start tasky on connect() call, instantiate a new Tasky engine in the libdnet ctor
This commit is contained in:
parent
fdf8d0ba04
commit
3ca097152f
@ -4,7 +4,7 @@
|
||||
*/
|
||||
module libdnet.libdnet;
|
||||
|
||||
import std.socket : Address;
|
||||
import std.socket : Address, Socket;
|
||||
import tasky.engine : Engine;
|
||||
|
||||
public class Client
|
||||
@ -31,6 +31,13 @@ public class Client
|
||||
/* TODO: Initialize stuff here */
|
||||
|
||||
this.endpoint = endpoint;
|
||||
|
||||
/* Open socket here */
|
||||
Socket sock = new Socket();
|
||||
sock.connect(endpoint);
|
||||
|
||||
/* Initialize a new Tasky engine */
|
||||
engine = new Engine(sock);
|
||||
}
|
||||
|
||||
|
||||
@ -39,13 +46,8 @@ public class Client
|
||||
*/
|
||||
public void connect()
|
||||
{
|
||||
/* FIXME: Don't start Tasky engine till we are actually connected (FIX in Tasky) */
|
||||
|
||||
/* Initialize a new Tasky engine */
|
||||
//engine = new Engine();
|
||||
|
||||
/* Start the Tasky engine */
|
||||
//engine.start();
|
||||
engine.start();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user