You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by zhukun1111 <zh...@163.com> on 2012/02/18 19:37:15 UTC

thrift libevent used for process protocol

hi
   Everyone, I got a problem. Sorry to bother you guys, I am new here.
    I run my own server using libevent to process network data, and after this step, I want to use thrift struct and rpc to do application work, But I don't know how  to do it?Anyone can teach me?
   For example, I got a char* buffer at client, how can I send to server by struct or rpc of thrift using my libevent architecture , and when  server  got data from libevent,  how can I process it using thrift.
    As far as I know, thrift use its own method to send data, but I just want to use my own nonblocking socket to send data,and server can read and decode,please help!
 
    thanks

RE: thrift libevent used for process protocol

Posted by "Christian, Daniel" <Da...@Honeywell.com>.
There isn't an existing interface to do what you want.

Thrift usually blocks listening for data (usually on a thread).  There are a couple server styles defined for most languages.

The non-blocking server is the only one that uses a select loop.  You need to look at that source and go from there.

-Dan

-----Original Message-----
From: zhukun1111 [mailto:zhukun1111@163.com] 
Sent: Saturday, February 18, 2012 11:37 AM
To: user@thrift.apache.org
Subject: thrift libevent used for process protocol

hi
   Everyone, I got a problem. Sorry to bother you guys, I am new here.
    I run my own server using libevent to process network data, and after this step, I want to use thrift struct and rpc to do application work, But I don't know how  to do it?Anyone can teach me?
   For example, I got a char* buffer at client, how can I send to server by struct or rpc of thrift using my libevent architecture , and when  server  got data from libevent,  how can I process it using thrift.
    As far as I know, thrift use its own method to send data, but I just want to use my own nonblocking socket to send data,and server can read and decode,please help!
 
    thanks