![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
RPC
RPC
gdut17
这个作者很懒,什么都没留下…
展开
-
搜狗workflow--04.redis_cli
class RedisValue{public: // nil RedisValue(); virtual ~RedisValue(); //copy constructor RedisValue(const RedisValue& copy); //copy operator RedisValue& operator= (const RedisValue& copy); //move constructor RedisValue(RedisValue&原创 2020-11-05 12:27:24 · 406 阅读 · 0 评论 -
搜狗workflow--03.异步http请求
//g++ -std=c++11 -o testhttp_get testhttp_get.cc -I/usr/local/include/workflow -lworkflow#include <netdb.h>#include <signal.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <string>#include <原创 2020-11-05 11:41:37 · 824 阅读 · 0 评论 -
搜狗workflow--02.https服务端
接入openssl生成密钥:openssl genrsa -out server.key 2048生成证书:openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650//g++ -std=c++11 -o testhttps testhttps.cc -I/usr/local/include/workflow -lworkflow -lssl -lcrypto#include <stdio.h&g原创 2020-11-05 11:25:23 · 986 阅读 · 0 评论 -
搜狗workflow--01.http服务端
//g++ -std=c++11 -o testhttp testhttp.cc -I/usr/local/include/workflow -lworkflow#include <stdio.h>#include "workflow/WFHttpServer.h"int main(){ WFHttpServer server([](WFHttpTask *task) { task->get_resp()->add_header_pair("Ser原创 2020-11-05 11:20:12 · 1439 阅读 · 1 评论 -
workflow框架 wget 实现http请求
类似于go的sync.WaitGroupvar wg sync.WaitGroupwg.Add(num)//启动的协程个数go func{defer wg.Done()…}wg.Wait()/* Copyright (c) 2019 Sogou, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance w原创 2020-10-22 21:05:14 · 674 阅读 · 0 评论