Beispiel #1
0
	void async_write(SyncWriteStreamT &s, const ConstBufferT &buf, const ComplateConditionT &condition, HandlerT &&handler, const AllocatorT &allocator)
	{
		typedef details::write_handler_t<SyncWriteStreamT, ConstBufferT, ComplateConditionT, HandlerT, AllocatorT> HookWriteHandler;

		HookWriteHandler hook_handler(s, buf, buf.size(), condition, 0, std::forward<HandlerT>(handler), allocator);
		s.async_write(hook_handler.buffer_, std::move(hook_handler), allocator);
	}
Beispiel #2
0
int main(int argc, char **argv)
{
    /* send back to channel if public request, otherwise back to sender */
    Dest = (argv[2][0] == '#') ? argv[2] : argv[1];

	if(argc < 4 || strlen(argv[3]) < 2) {
		reply(HELPTEXT);
		return 0;
	}

	hook_handler(argv[3]);

	return 0;
}