Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
c824aca9
Commit
c824aca9
authored
Nov 03, 2017
by
wangxuefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jump back to root dir.
parent
445b444e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
.travis.yml
.travis.yml
+1
-1
thrift_client.cpp
example/thrift_extension_c++/thrift_client.cpp
+6
-12
No files found.
.travis.yml
View file @
c824aca9
...
...
@@ -13,7 +13,7 @@ env:
install
:
-
sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev libboost-dev libssl-dev
-
sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo env "PATH=$PATH" cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
-
wget http://www.us.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz && tar -xvf thrift-0.9.3.tar.gz && cd thrift-0.9.3/ && ./configure --prefix=/usr --with-ruby=no --with-python=no --with-java=no --with-go=no --with-perl=no --with-php=no --with-csharp=no --with-erlang=no --with-lua=no --with-nodejs=no && make && sudo make install
-
wget http://www.us.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz && tar -xvf thrift-0.9.3.tar.gz && cd thrift-0.9.3/ && ./configure --prefix=/usr --with-ruby=no --with-python=no --with-java=no --with-go=no --with-perl=no --with-php=no --with-csharp=no --with-erlang=no --with-lua=no --with-nodejs=no && make && sudo make install
&& cd -
script
:
-
sh build_in_travis_ci.sh
example/thrift_extension_c++/thrift_client.cpp
View file @
c824aca9
...
...
@@ -6,24 +6,18 @@
#include <iostream>
using
namespace
apache
::
thrift
;
using
namespace
apache
::
thrift
::
protocol
;
using
namespace
apache
::
thrift
::
transport
;
using
namespace
example
;
int
main
(
int
argc
,
char
**
argv
)
{
boost
::
shared_ptr
<
TSocket
>
socket
(
new
TSocket
(
"127.0.0.1"
,
8019
));
boost
::
shared_ptr
<
TTransport
>
transport
(
new
TFramedTransport
(
socket
));
boost
::
shared_ptr
<
TProtocol
>
protocol
(
new
TBinaryProtocol
(
transport
));
std
::
shared_ptr
<
apache
::
thrift
::
TSocket
>
socket
(
new
apache
::
thrift
::
TSocket
(
"127.0.0.1"
,
8019
));
std
::
shared_ptr
<
apache
::
thrift
::
transport
::
TTransport
>
transport
(
new
apache
::
thrift
::
transport
::
TFramedTransport
(
socket
));
std
::
shared_ptr
<
apache
::
thrift
::
protocol
::
TProtocol
>
protocol
(
new
apache
::
thrift
::
protocol
::
TBinaryProtocol
(
transport
));
EchoServiceClient
client
(
protocol
);
example
::
EchoServiceClient
client
(
protocol
);
transport
->
open
();
EchoRequest
req
;
example
::
EchoRequest
req
;
req
.
data
=
"hello"
;
EchoResponse
res
;
example
::
EchoResponse
res
;
client
.
Echo
(
res
,
req
);
std
::
cout
<<
"Res: "
<<
res
.
data
<<
std
::
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment