i) is the C, cpp interface similar, please give example ii) I got further. Where is TException defined? What is the method to print out exception message?
Got the following: PHP Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /home/simon/PROG/PHP/UTILITY/trunk/facebook/thrift/transport/TSocket.php on line 281 PHP Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /home/simon/PROG/PHP/UTILITY/trunk/facebook/thrift/transport/TSocket.php on line 287 Failed registeringPHP Fatal error: Call to undefined method TException::message() in /home/simon/PROG/PHP/UTILITY/trunk/facebook/simonsays/ss.php on line 41 On Fri, Sep 18, 2009 at 10:19 AM, Patrick Schlangen <[email protected]>wrote: > Hi, > > $input has to be the protocol class instance. > > Example: > > $socket = new TSocket($host, $port); > $transport = new TBufferedTransport($socket); > $protocol = new TBinaryProtocol($transport); > $client = new SimonSaysClient($protocol); > $transport->open(); > > // use $client > > $transport->close(); > > -- > Patrick Schlangen > [email protected] > > > > Am 18.09.2009 um 19:14 schrieb Simon Chu: > > > class SimonSaysClient implements SimonSaysIf { >> protected $input_ = null; >> protected $output_ = null; >> >> protected $seqid_ = 0; >> >> public function __construct($input, $output=null) { >> $this->input_ = $input; >> $this->output_ = $output ? $output : $input; >> } >> >> >> The above code was generated, what are the expected values of $input and >> $output? I put in the facebook thrift server name (with or without the >> port) as $input got this error: >> >> PHP Fatal error: Call to a member function writeMessageBegin() on a >> non-object in >> /home/simon/PROG/PHP/UTILITY/trunk/facebook/simonsays/SimonSays.php on >> line >> 47 >> > >
