Trunk (and 0.7) use Thrift's framed transport, so you should wrap your TSocket in a TFramedTransport. On 0.6 and earlier you should have been wrapping with a TBufferedTransport for better performance but the framed transport is inherently buffered.
On Sep 19, 2010, at 4:31 PM, Morten Wegelbye Nissen <m...@monit.dk> wrote: > Hello List, > > Knowing this question might be more in the area of thrift then cassandra, > here goes: > > I have been trying to do some research in using cassandra as backend for a > system build for .net, but for some reason my client seams to terminat no > matter what I do. > > I am using latest from trunk, using the CliClient everything seams to work, I > can insert and get data. > > What I have done so far, I have noticed that the thrift.jar is build from > r959516 of the thrift project - so I have fetched that from the thrift > project. > I have used the thrift.exe to generate the source from cassandra.thrift. > Boiled it together in a C# project, and start to run it. > But, as soon as I issue the first RPC command, a IOException( Unable to write > data to the transport connection: An established connection was aborted by > the software in your host machine. ) i thrown. > > I have used netcat to setup a "fake" cassandra server to ensure that it is > nothing to do with firewall or network issues. And here I see data. > > The code to I use is: > TTransport transport = new TSocket("192.168.0.103", 9160); > TProtocol protocol = new TBinaryProtocol(transport); > transport.Open(); > Cassandra.Client client = new Cassandra.Client(protocol); > Dictionary<string,string> auth = new Dictionary<string,string>( ); > auth.Add( "dilbert", "nomoovertime" ); > AuthenticationRequest ar = new AuthenticationRequest(); > ar.Credentials = auth; > client.send_login( ar ); > > Any clues, help, directions would be really appreciated, > Morten >