Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3361

Improve C# library

    XMLWordPrintableJSON

    Details

    • Patch Info:
      Patch Available

      Description

      Server exception handling

      Servers didn't propagate exceptions in handler code to the client.

      Same as THRIFT-3349 (python) and THRIFT-3335 (ruby)

      TBufferedTransport

      System.IO.BufferedStream inside this transport made it strongly tied to underlying transport's stream state.
      More concretely, when used on top of TTLSSocket it crashed because underlying SslStream is disposed by the socket while BufferedStream kept trying to touch the disposed stream after that.

      So I removed BufferedStream and made it use System.IO.MemoryBuffer instead.

      • Can now work on top of TTLSSocket
      • Underlying transport no longer needs to be a TStreamTransport

      TFramedTransport

      It was allocating new MemoryBuffer for nealy every write and read of frames.
      I made it allocate only once.

      JSONProtocol

      • Can now handle Base64 with padding for binary fields (Fixes C# part of THRIFT-3359)

      TTLSSocket

      • Make client certificate optional

      Test

      With this patch applied, all the cross test apps should be mostly valid.

      • Fix SSL setup
      • Semantic return code
      • Add testException and testMultiException
      • Add missing assertions

        Attachments

          Activity

            People

            • Assignee:
              nsuke Nobuaki Sukegawa
              Reporter:
              nsuke Nobuaki Sukegawa
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: