Network Programming with Rust: Build fast and resilient network servers and clients by leveraging Rust's memory-safety and concurrency features by Abhishek Chanda

Network Programming with Rust: Build fast and resilient network servers and clients by leveraging Rust's memory-safety and concurrency features by Abhishek Chanda

Author:Abhishek Chanda [Chanda, Abhishek]
Language: eng
Format: epub
Tags: COM043040 - COMPUTERS / Networking / Network Protocols, COM043000 - COMPUTERS / Networking / General, COM051000 - COMPUTERS / Programming / General
Publisher: Packt Publishing
Published: 2018-02-27T00:00:00+00:00


extern crate grpc_example;

extern crate grpc;

extern crate protobuf;

use std::thread;

use grpc_example::foobar_grpc::*;

use grpc_example::foobar::*;

struct FooBarServer;

// Implementation of RPC functions

impl FooBarService for FooBarServer {

fn record_cab_location(&self,

_m: grpc::RequestOptions,

req: CabLocationRequest)

->

grpc::SingleResponse<CabLocationResponse> {

let mut r = CabLocationResponse::new();

println!("Recorded cab {} at {}, {}", req.get_name(),

req.get_location().latitude, req.get_location().longitude);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.