łň ː„Jc@s#ddklZddklZlZddklZdefd„ƒYZddd„ƒYZddd „ƒYZ d dd „ƒYZ d dd „ƒYZ ddd„ƒYZ dee fd„ƒYZ dee fd„ƒYZdd d„ƒYZdee fd„ƒYZdefd„ƒYZdS(!i˙˙˙˙(tStringIO(tpacktunpack(t TExceptiontTTransportExceptioncBs;eZdZdZdZdZdZdZedd„Z RS(s Custom Transport Exception classiiiiicCsti||ƒ||_dS(N(Rt__init__ttype(tselfRtmessage((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR"sN( t__name__t __module__t__doc__tUNKNOWNtNOT_OPENt ALREADY_OPENt TIMED_OUTt END_OF_FILEtNoneR(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRstTTransportBasecBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(s&Base class for Thrift transport layer.cCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytisOpen*scCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytopen-scCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytclose0scCsdS(N((Rtsz((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytread3scCsrd}d}x_||joQ|i||ƒ}|t|ƒ7}||7}t|ƒdjo tƒ‚qqW|S(Nti(RtlentEOFError(RRtbuffthavetchunk((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytreadAll6s cCsdS(N((Rtbuf((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytwriteCscCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytflushFs( R R R RRRRRR R!(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR&s     tCReadableTransportcBs&eZdZed„ƒZd„ZRS(s2base class for transports that are readable from CcCsdS(sBA cStringIO buffer that contains the current chunk we are reading.N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyt cstringio_bufSscCsdS(s­Refills cstringio_buf. Returns the currently used buffer (which can but need not be the same as the old cstringio_buf). partialread is what the C code has read from the buffer, and should be inserted into the buffer before any more reads. The return value must be a new, not borrowed reference. Something along the lines of self._buf should be fine. If reqlen bytes can't be read, throw EOFError. N((Rt partialreadtreqlen((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytcstringio_refillXs (R R R tpropertyR#R&(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR"JstTServerTransportBasecBs)eZdZd„Zd„Zd„ZRS(s(Base class for Thrift server transports.cCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytlisteniscCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pytacceptlscCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRos(R R R R)R*R(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR(es  tTTransportFactoryBasecBseZdZd„ZRS(s"Base class for a Transport FactorycCs|S(N((Rttrans((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyt getTransportvs(R R R R-(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR+rstTBufferedTransportFactorycBseZdZd„ZRS(s1Factory transport that builds buffered transportscCst|ƒ}|S(N(tTBufferedTransport(RR,tbuffered((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR-}s (R R R R-(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR.ysR/cBskeZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z e d „ƒZ d „Z RS( s7Class that wraps another transport and buffers its I/O.icCs(||_tƒ|_tdƒ|_dS(NR(t_TBufferedTransport__transRt_TBufferedTransport__wbuft_TBufferedTransport__rbuf(RR,((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRˆs  cCs |iiƒS(N(R1R(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRscCs |iiƒS(N(R1R(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRscCs |iiƒS(N(R1R(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR“scCsd|ii|ƒ}t|ƒdjo|Snt|iit||iƒƒƒ|_|ii|ƒS(Ni(R3RRRR1tmaxtDEFAULT_BUFFER(RRtret((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR–s 'cCs|ii|ƒdS(N(R2R (RR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR žscCs<|iiƒ}tƒ|_|ii|ƒ|iiƒdS(N(R2tgetvalueRR1R R!(Rtout((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR!Ąs cCs|iS(N(R3(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR#ŠscCs€|}||ijo||ii|iƒ7}nt|ƒ|jo$||ii|t|ƒƒ7}nt|ƒ|_|iS(N(R5R1RRRRR3(RR$R%t retstring((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR&­s$(R R R R5RRRRRR R!R'R#R&(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR/‚s       t TMemoryBuffercBsqeZdZd d„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z e d „ƒZ d „ZRS( s3Wraps a cStringIO object as a TTransport. NOTE: Unlike the C++ version of this class, you cannot write to it then immediately read from it. If you want to read from a TMemoryBuffer, you must either pass a string to the constructor. TODO(dreiss): Make this work like the C++ version. cCs0|dj ot|ƒ|_n tƒ|_dS(s‡value -- a value to read from for stringio If value is set, this will be a transport for reading, otherwise, it is for writingN(RRt_buffer(Rtvalue((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRĂs cCs |ii S(N(R;tclosed(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRÍscCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRĐscCs|iiƒdS(N(R;R(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRÓscCs|ii|ƒS(N(R;R(RR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRÖscCs|ii|ƒdS(N(R;R (RR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR ŮscCsdS(N((R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR!ÜscCs |iiƒS(N(R;R7(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR7ßscCs|iS(N(R;(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR#ăscCs tƒ‚dS(N(R(RR$R%((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR&çsN(R R R RRRRRRR R!R7R'R#R&(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR:şs       tTFramedTransportFactorycBseZdZd„ZRS(s/Factory transport that builds framed transportscCst|ƒ}|S(N(tTFramedTransport(RR,tframed((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR-ďs (R R R R-(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR>ësR?cBsneZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z e d „ƒZ d „Z RS( sCClass that wraps another transport and frames its I/O when writing.cCs%||_tƒ|_tƒ|_dS(N(t_TFramedTransport__transRt_TFramedTransport__rbuft_TFramedTransport__wbuf(RR,((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRřs  cCs |iiƒS(N(RAR(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRýscCs |iiƒS(N(RAR(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRscCs |iiƒS(N(RAR(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRscCsG|ii|ƒ}t|ƒdjo|Sn|iƒ|ii|ƒS(Ni(RBRRt readFrame(RRR6((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRs  cCsC|iidƒ}td|ƒ\}t|ii|ƒƒ|_dS(Nis!i(RARRRRB(RRR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRDscCs|ii|ƒdS(N(RCR (RR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR scCs[|iiƒ}t|ƒ}tƒ|_td|ƒ|}|ii|ƒ|iiƒdS(Ns!i(RCR7RRRRAR R!(RtwouttwszR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR!s   cCs|iS(N(RB(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR#$scCsKx2t|ƒ|jotƒ||iiƒ7}qWt|ƒ|_|iS(N(RRDRBR7R(RtprefixR%((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR&(s (R R R RRRRRRDR R!R'R#R&(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR?ôs        tTFileObjectTransportcBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s?Wraps a file-like object to make it work as a Thrift transport.cCs ||_dS(N(tfileobj(RRI((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR6scCstS(N(tTrue(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR9scCs|iiƒdS(N(RIR(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR<scCs|ii|ƒS(N(RIR(RR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR?scCs|ii|ƒdS(N(RIR (RR((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR BscCs|iiƒdS(N(RIR!(R((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyR!Es( R R R RRRRR R!(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyRH3s     N(((((((t cStringIORtstructRRt thrift.ThriftRRRR"R(R+R.R/R:R>R?RH(((st/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/transport/TTransport.pyss$  81 ?