You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Philippe Strauss <ph...@philou.ch> on 2011/09/06 21:44:53 UTC
ocaml client usage example
Hello thrift users,
I'm no ready to tinker w thrift using a c++ server and an ocaml client, but ocaml examples are rather thin, I've only found the test/ocaml directory, about initializing socket and co., but it doesnt work in the way I expected.
let sock = new TSocket.t "192.168.1.100" 9090 in
let proto = new TBinaryProtocol.t sock in
let client = new Control.client proto proto in
philou@air:~/mysrc/audio/jack_preamp/remote$ ./rc.opt
In callback for signal motion_notify_event, uncaught exception: Thrift.Transport.E(1, "TSocket: Socket not open")
In callback for signal motion_notify_event, uncaught exception: Thrift.Transport.E(1, "TSocket: Socket not open")
In callback for signal motion_notify_event, uncaught exception: Thrift.Transport.E(1, "TSocket: Socket not open")
Someone with an example ocaml working client ? (and using simple TCP/IP socket).
Re: ocaml client usage example
Posted by Philippe Strauss <ph...@philou.ch>.
oh I forgot the sock #opn;
it works fine now.
Le 6 sept. 2011 à 21:44, Philippe Strauss a écrit :
> Hello thrift users,
>
> I'm no ready to tinker w thrift using a c++ server and an ocaml client, but ocaml examples are rather thin, I've only found the test/ocaml directory, about initializing socket and co., but it doesnt work in the way I expected.
>
> let sock = new TSocket.t "192.168.1.100" 9090 in
> let proto = new TBinaryProtocol.t sock in
> let client = new Control.client proto proto in
>
> philou@air:~/mysrc/audio/jack_preamp/remote$ ./rc.opt
> In callback for signal motion_notify_event, uncaught exception: Thrift.Transport.E(1, "TSocket: Socket not open")
> In callback for signal motion_notify_event, uncaught exception: Thrift.Transport.E(1, "TSocket: Socket not open")
> In callback for signal motion_notify_event, uncaught exception: Thrift.Transport.E(1, "TSocket: Socket not open")
>
> Someone with an example ocaml working client ? (and using simple TCP/IP socket).