GithubHelp home page GithubHelp logo

jerry-0824 / 045_protobuf_people_demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lytsing/protobuf-demo

0.0 2.0 0.0 427 KB

Protobuf demo: C++ server and Java client commumication with socket

Makefile 4.35% Java 22.26% C++ 70.88% Protocol Buffer 2.51%

045_protobuf_people_demo's Introduction

Protobuf demo

C++ server and Java client commumication with socket

Download and install protobuf

Go to http://code.google.com/p/protobuf/ download the latest updates version

wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar xvf protobuf-2.4.1.tar.bz2
cd protobuf-2.4.1/
./configure && make && make install

Normal, it installed in /usr/local

You need to export the environment variable, edit ~/.bashrc , add:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

If you use Ubuntu, it is very easy to install:

sudo apt-get install libprotobuf-dev libprotobuf-java
export CLASSPATH=$CLASSPACH:/usr/share/java/protobuf.jar

Compile

In unix* like system:

export CLASSPATH=./lib/protobuf-java-2.4.1.jar:$CLASSPATH
make

How to use

Open one terminal, start the server:

$ ./s

Open another terminal, run the client:

$ ./c

or

$ java TestPeople

Enjoy coding!

045_protobuf_people_demo's People

Contributors

lytsing avatar jerry-0824 avatar harrigan avatar

Watchers

James Cloos 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.