GithubHelp home page GithubHelp logo

tilongzs / grpc_example Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 169 KB

gRPC的基本使用演示工程。包含同步模式和异步模式的基本使用示例。演示了全部的一对一、一对多、多对一、多对多模式,以及多线程。

License: Apache License 2.0

C++ 92.11% C 7.89%

grpc_example's Introduction

gRPC_example

介绍

gRPC的基本使用演示工程。包含同步模式和异步模式的基本使用示例。演示了全部的一对一、一对多、多对一、多对多模式,以及多线程。

安装教程

通过vcpkg安装gRPC。

  • .\vcpkg install grpc

默认使用Debug、X64配置,以及C++14标准编译。

使用说明

gRPC_AsyncClient与gRPC_AsyncServer是两个控制台工程,异步gRPC框架的基本使用。来源是https://github.com/Mityuha/grpc_async ,对应着一位俄罗斯软件工程师的一篇博客https://habr.com/en/post/340758 ,对我的帮助非常大。为减少歧义,代码中的英文注释我就保持原样了。

gRPC_MFCClient与gRPC_MFCServer是两个MFC工程,包含同步模式和异步模式的基本使用示例。异步服务端默认是1个线程,可以根据需要开启多个线程(与CPU同等数量)。客户端则使用单线程,其实我觉得客户端使用同步模式更方便些。

其他

博客原文:https://www.mengmei.moe/note/1015.html 编译问题请参考:《gRPC-开发常用笔记

grpc_example's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.