Added event loop.
This commit is contained in:
parent
350ef9bdd3
commit
05718602b3
|
@ -18,5 +18,10 @@ public final class Manager
|
|||
{
|
||||
/* TODO: Create the watcher */
|
||||
watcher = new Watcher(this, endpoint);
|
||||
|
||||
/* TODO: Other initializations (queues etc.) */
|
||||
|
||||
/* Start the watcher */
|
||||
watcher.start();
|
||||
}
|
||||
}
|
|
@ -22,7 +22,16 @@ public final class Watcher : Thread
|
|||
|
||||
this(Manager manager, Socket endpoint)
|
||||
{
|
||||
super(&watchLoop);
|
||||
this.manager = manager;
|
||||
this.endpoint = endpoint;
|
||||
}
|
||||
|
||||
private void watchLoop()
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
/* TODO: Loop here */
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue