6 // Todd Berman <tberman@imeem.com>
8 // Copyright (C) 2007 imeem, inc. <http://www.imeem.com>
9 // All rights reserved.
13 using System
.Collections
.Generic
;
16 namespace Thrift
.Transport
18 public abstract class TTransport
20 public abstract bool IsOpen
30 public abstract void Open();
32 public abstract void Close();
34 public abstract int Read(byte[] buf
, int off
, int len
);
36 public int ReadAll(byte[] buf
, int off
, int len
)
43 ret
= Read(buf
, off
+ got
, len
- got
);
46 throw new TTransportException("Cannot read, Remote side has closed");
54 public abstract void Write(byte[] buf
, int off
, int len
);
56 public virtual void Flush()