summaryrefslogtreecommitdiff
path: root/lib/csharp/src/Transport/TFramedTransport.cs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csharp/src/Transport/TFramedTransport.cs')
-rw-r--r--lib/csharp/src/Transport/TFramedTransport.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/csharp/src/Transport/TFramedTransport.cs b/lib/csharp/src/Transport/TFramedTransport.cs
index 3436cc6fe..a746a3223 100644
--- a/lib/csharp/src/Transport/TFramedTransport.cs
+++ b/lib/csharp/src/Transport/TFramedTransport.cs
@@ -108,7 +108,7 @@ namespace Thrift.Transport
writeBuffer.Write(buf, off, len);
}
- public override void Flush()
+ private void InternalFlush()
{
CheckNotDisposed();
if (!IsOpen)
@@ -126,10 +126,29 @@ namespace Thrift.Transport
transport.Write(buf, 0, len);
InitWriteBuffer();
+ }
+
+ public override void Flush()
+ {
+ CheckNotDisposed();
+ InternalFlush();
transport.Flush();
}
+ public override IAsyncResult BeginFlush(AsyncCallback callback, object state)
+ {
+ CheckNotDisposed();
+ InternalFlush();
+
+ return transport.BeginFlush( callback, state);
+ }
+
+ public override void EndFlush(IAsyncResult asyncResult)
+ {
+ transport.EndFlush( asyncResult);
+ }
+
private void InitWriteBuffer()
{
// Reserve space for message header to be put right before sending it out