ClientTask

HTTP client task. It sends one HTTP GET request and receives and parses the response, expecting response_payload as the response payload.

Constructors

this
this()
Undocumented in source.

Members

Functions

run
void run()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

e
SocketError e;
Undocumented in source.
e_unhandled
Exception e_unhandled;
Undocumented in source.
socket
IPSocket!() socket;
Undocumented in source.
tst
TaskSelectTransceiver tst;
Undocumented in source.

Inherited Members

From Task

object_pool_index
size_t object_pool_index;

Reserved index field which ensures that any Task derivative can be used with ObjectPool. That comes at minor cost of one unused size_t per Task instance if not needed which is not a problem.

fiber
WorkerFiber fiber;

Fiber this task executes in

getThis
Task getThis()
assignTo
void assignTo(WorkerFiber fiber, void delegate() entry_point)

Assigns the task to a fiber. In most cases you need to use Scheduler.schedule instead.

suspend
void suspend()

Suspends execution of this task.

resume
void resume()

Resumes execution of this task. If task has not been started yet, starts it.

terminationHook
void terminationHook(void delegate() hook)

Registers a termination hook that will be executed when the Task is killed.

removeTerminationHook
void removeTerminationHook(void delegate() hook)

Unregisters a termination hook that would be executed when the Task is killed.

suspended
bool suspended()
finished
bool finished()
kill
void kill(istring file, int line)

Forces abnormal termination for the task by throwing special exception instance.

recycle
void recycle()

Method that will be run by scheduler when task finishes. Must be overridden by specific task class to reset reusable resources.

run
void run()

Method that must be overridden in actual application/library task classes to provide entry point.

entryPoint
bool entryPoint()

Internal wrapper around this.run() which is used as primary fiber entry point and ensures any uncaught exception propagates to the context that has started this task.

Meta