Manager

Manager

This is the core class that is to be instantiated that represents an instance of the tristanable framework. It is passed a Socket from which it reads from (using a bformat block reader).

It contains a Watcher which does the reading and appending to respective queues (the user need not worry about this factum).

The functions provided allow users to wait in a tight loop to dequeue ("receive" in a blcoking mannger) from a specified queue.

Constructors

this
this(Socket socket)

Constructs a new Manager with the given endpoint Socket

Members

Functions

addQueue
void addQueue(Queue queue)

Adds the given Queue, queue, to the manager

generateQueue
Queue generateQueue()

Returns a new queue with a new ID, if all IDs are used then it returns null

getQueue
Queue getQueue(ulong tag)
Undocumented in source. Be warned that the author may not have intended to support it.
getQueues
Queue[] getQueues()
Undocumented in source. Be warned that the author may not have intended to support it.
getSocket
Socket getSocket()
Undocumented in source. Be warned that the author may not have intended to support it.
isValidTag
bool isValidTag(ulong tag)
Undocumented in source. Be warned that the author may not have intended to support it.
removeQueue
void removeQueue(Queue queue)

Removes the given Queue, queue, from the manager

shutdown
void shutdown()

TODO: Comment TODO: Testing

Meta