Asynchronous operations are started by calling a free function or member function known as an asynchronous ['__async_initfn__]. This function accepts parameters specific to the operation as well as a __CompletionToken__. The token is either a completion handler, or a type defining how the caller is informed of the asynchronous operation result. Networking provides the special tokens __use_future__ and __yield_context__ for using futures and coroutines respectively. This system of customizing the return value and method of completion notification is known as the ['Universal Asynchronous Model] described in __N3747__, and a built in to __NetTS__. Here is an example of an initiating function which reads a line from the stream and echoes it back. This function is developed further in the next section:
Asynchronous operations are started by calling a free function or member function known as an asynchronous ['__async_initfn__]. This function accepts parameters specific to the operation as well as a __CompletionToken__. The token is either a completion handler, or a type defining how the caller is informed of the asynchronous operation result. Networking provides the special tokens __use_future__ and __yield_context__ for using futures and coroutines respectively. This system of customizing the return value and method of completion notification is known as the ['Universal Asynchronous Model] described in __N3747__, and a built in to __NetTS__. Here is an example of an initiating function which reads a line from the stream and echoes it back. This function is developed further in the next section: