+
    8it                       R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RIH
t
HtHtHtHt ^ RIHtHtHtHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
I H!t!H"t"H#t# ^ RI$H%t%  ^ RI&H't'H(t( Rt) ^ RI+H,t, Rt-^ RI.H/t/H0t0H1t1 ]'       d   ^ RI2H3t3 ^ RI4H5t5 ]Pl                  ! R4      Pn                  t8]Pl                  ! R4      Pn                  t9Rt:];.]/O]Px                  O5t<R R lt=]P|                  R8w  d   R R lt?R<R R llt@MR R lt?R<R R  llt@R! R" ltAR# R$ ltBR% R& ltCR' R( ltDR)]P                  9   tF]P|                  R8H  tGR* R+ ltHR, R- ltI ! R. R/4      tJ ! R0 R1]J4      tK ! R2 R3]J4      tL ! R4 R5]4      tMR6 R7 ltN]3R8 R9 lltO]3R: R; lltPR#   ]* d    Rt) EL:i ; i  ]* d	    Rt-](t, ELCi ; i)=z&Internal network layer helper methods.)annotationsN)AbstractEventLoopBaseTransportBufferedProtocolFuture	Transport)TYPE_CHECKINGAnyOptionalUnion)_csotssl_support)create_task)MAX_MESSAGE_SIZE)
decompress)ProtocolError_OperationCancelled)_UNPACK_REPLY_OpMsg_OpReply)_errno_from_exception)SSLError	SSLSocketTF)_sslConn)BLOCKING_IO_LOOKUP_ERRORBLOCKING_IO_READ_ERRORBLOCKING_IO_WRITE_ERROR)AsyncConnection)
Connectionz<iiiiz<iiBg      ?c               $    V ^8  d   QhRRRRRR/#    sockUnion[socket.socket, _sslConn]bufbytesreturnNone )formats   "S/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/network_layer.py__annotate__r+   K   s#     ! !%C !% !TX !    c                @  "   V P                  4       pV P                  R 4       \        P                  ! 4       p \        '       dH   \        V \        \        34      '       d,   \        P                  ! \        WV4      VR7      G Rj  xL
  M0\        P                  ! VP                  W4      VR7      G Rj  xL
   V P                  V4       R#  LH L  \        P                   d   p\        P                  ! R4      ThRp?ii ; i  T P                  T4       i ; i5i)        timeoutN	timed out)
gettimeout
settimeoutasyncioget_running_loop	_HAVE_SSL
isinstancer   r   wait_for_async_socket_sendall_sslsock_sendallTimeoutErrorsocketr0   )r"   r$   r0   loopexcs   &&   r*   async_socket_sendallr?   K   s     ooGOOC##%D	!9D9h*?@@""#<T#MW^___""4#4#4T#?QQQ
 	  `Q 3nn[)s23 	 sk   7DAC CC D *C 7C8C <D =DC C D)D  DD DDwin32c               (    V ^8  d   QhRRRRRRRR/# )	r!   r"   r#   r$   r%   r=   r   r&   r'   r(   )r)   s   "r*   r+   r+   ]   s,     )/ )/,)/38)/@Q)/	)/r,   c                *  "   \        V4      p^ pR R lpV\        V4      8  d    W@P                  W4R 4      ,          pK,  R#   \         Ed   pT P	                  4       pTR8X  d   \        R4      Rh\        T\        4      '       dW   TP                  4       pTP                  YuT4        TG Rj  xL 
  TP                  T4       M  TP                  T4       i ; i\        T\        4      '       dW   TP                  4       pTP                  YuT4        TG Rj  xL 
  TP                  T4       M  TP                  T4       i ; i\        '       d   \        T\        4      '       d   TP                  4       pTP                  YuT4        TP                  YuT4       TG Rj  xL 
  TP                  T4       TP                  T4        Rp?EK    TP                  T4       TP                  T4       i ; i Rp?EK   Rp?EK  Rp?ii ; i5i)    c                    V ^8  d   QhRRRR/# r!   futzFuture[Any]r&   r'   r(   )r)   s   "r*   r+   /_async_socket_sendall_ssl.<locals>.__annotate__c        	! 	!; 	!4 	!r,   c                X    V P                  4       '       d   R # V P                  R 4       R # Ndone
set_resultrF   s   &r*   	_is_ready,_async_socket_sendall_ssl.<locals>._is_readyc       xxzzNN4 r,   N!Underlying socket has been closed)
memoryviewlensendBLOCKING_IO_ERRORSfilenor   r7   r   create_future
add_readerremove_readerr   
add_writerremove_writer_HAVE_PYOPENSSLr   )	r"   r$   r=   viewsentrO   r>   fdrF   s	   &&&      r*   r9   r9   ]   s     #	!
 SXo/		$u+..  & /[[]8"#FGTQc#9::,,.COOB37/!		**2.**2.c#:;;,,.COOB37/!		**2.**2."?z#7O'P'P,,.COOB37/s;!		**2.**2.. **2.**2. (Q?'/s   $HA  HHAH,C	1B42C	7H	C;HD5D D5#H5EH8HG'F*(G-"HH$G::H=HHHc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r!   connr   lengthintr=   r   onceOptional[bool]r&   rT   r(   )r)   s   "r*   r+   r+      s4     0 00 #0+<0DR0	0r,   c                j  "   \        \        V4      4      p^ pR R lpWQ8  d>    V P                  WER 4      pV^ 8X  d   \        R4      hV'       d   VRV # WW,          pKC  V#   \         Ed   pT P                  4       p	T	R8X  d   \        R4      Rh\        T\        4      '       dW   TP                  4       p
TP                  YT
4        T
G Rj  xL 
  TP                  T	4       M  TP                  T	4       i ; i\        T\        4      '       dW   TP                  4       p
TP                  YT
4        T
G Rj  xL 
  TP                  T	4       M  TP                  T	4       i ; i\        '       d   \        T\         4      '       d   TP                  4       p
TP                  YT
4        TP                  YT
4       T
G Rj  xL 
  TP                  T	4       TP                  T	4        Rp?EK    TP                  T	4       TP                  T	4       i ; i Rp?EK   Rp?EK  Rp?ii ; i5i)rC   c                    V ^8  d   QhRRRR/# rE   r(   )r)   s   "r*   r+   /_async_socket_receive_ssl.<locals>.__annotate__   rH   r,   c                X    V P                  4       '       d   R # V P                  R 4       R # rJ   rK   rN   s   &r*   rO   ,_async_socket_receive_ssl.<locals>._is_ready   rQ   r,   Nconnection closedrR   rS   )rT   	bytearray	recv_intoOSErrorrW   rX   r   r7   r   rY   rZ   r[   r   r\   r]   r^   r   )rc   rd   r=   rf   mv
total_readrO   readr>   ra   rF   s   &&&&       r*   _async_socket_receive_sslrt      s     	&)*
	!
 !#/~~bo619!"566et9$"
: 	9 & /[[]8"#FGTQc#9::,,.COOB37/!		**2.**2.c#:;;,,.COOB37/!		**2.**2."?z#7O'P'P,,.COOB37/s;!		**2.**2.. **2.**2. (Q?'/s   #H3,A$ A$ H3A$  H3$H00AH+C)CC)H+)C<<;H+8E=E >EH+E((H+78H+0G6G
G6"H+/H36$HH+H3+H00H3c               (    V ^8  d   QhRRRRRRRR/# )	r!   r"   r#   r$   r%   dummyr   r&   r'   r(   )r)   s   "r*   r+   r+      s,      ,38AR	r,   c                J  "   \        V4      p\        V4      p^ pRpWT8  dM    V P                  W5R 4      pV^ 8  d   \        V^,          R4      pM\        V^,          R4      pWW,          pKR  R#   \         d%    \        P
                  ! T4      G Rj  xL 
  ^ p Lhi ; i5i)rC   MbP?NMb?)rT   rU   rV   rW   r4   sleepmaxmin)r"   r$   rv   r_   total_length
total_sentbackoffr`   s   &&&     r*   r9   r9      s      #3x
 'yyk!23 axgk51gk51J ( & mmG,,,s3   !B#A1 :B#1$B BB B#B  B#c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r!   rc   r   rd   re   rv   r   rf   rg   r&   rT   r(   )r)   s   "r*   r+   r+      s4       #,=ES	r,   c                  "   \        \        V4      4      p^ pRpWQ8  dm    V P                  WER 4      pV^ 8X  d   \        R4      hV'       d   VRV #  V^ 8  d   \        V^,          R4      pM\        V^,          R4      pWW,          pKr  V#   \         d%    \
        P                  ! T4      G Rj  xL 
  ^ p Lhi ; i5i)rC   rx   Nrm   ry   )	rT   rn   ro   rp   rW   r4   rz   r{   r|   )rc   rd   rv   rf   rq   rr   r   rs   s   &&&&    r*   rt   rt      s      	&)*
 !	~~bo619!"566et9$ 
 axgk51gk51J	 & mmG,,,s:   C,B B <C$B>3B64B>;C=B>>Cc               $    V ^8  d   QhRRRRRR/# r    r(   )r)   s   "r*   r+   r+      s"      0 u  r,   c                (    V P                  V4       R # rJ   )sendall)r"   r$   s   &&r*   r   r      s    LLr,   c                    V ^8  d   QhRRRR/# )r!   rc   r   r&   r'   r(   )r)   s   "r*   r+   r+      s     + +? +t +r,   c                   "    V P                   P                  '       d   R# \        P                  ! \        4      G Rj  xL
  KC   L5iTN)cancel_context	cancelledr4   rz   _POLL_TIMEOUTrc   s   &r*   _poll_cancellationr      s/     
(((mmM***s   AAA Ac               $    V ^8  d   QhRRRRRR/# )r!   r"   r#   rd   re   r&   rT   r(   )r)   s   "r*   r+   r+      s$     & &
(&25&&r,   c           	     X  "   V P                  4       pTpV P                  R 4       \        P                  ! 4       p \        '       dZ   \        V \        \        34      '       d>   \        P                  ! \        WVRR7      VR7      G Rj  xL
 V P                  V4       # \        P                  ! \        WV4      VR7      G Rj  xL
 V P                  V4       #  LP L  \        P                   d   p\        P                  ! R4      ThRp?ii ; i  T P                  T4       i ; i5i)r.   T)rf   r/   Nr1   )r2   r3   r4   r5   r6   r7   r   r   r8   rt   _async_socket_receiver;   r<   r0   )r"   rd   sock_timeoutr0   r=   errs   &&    r*   async_receive_data_socketr      s      ??$LGOOC##%D&9D9h*?@@ )))$4H  	% !))%dD9  	%
  3nn[)s23 	%se   9D*AC  CC  D*!%C  CC  
D*C  C   D5DDD D''D*c               (    V ^8  d   QhRRRRRRRR/# )	r!   rc   socket.socketrd   re   r=   r   r&   rT   r(   )r)   s   "r*   r+   r+     s,     
 


!$
,=

r,   c                   "   \        \        V4      4      p^ pWA8  d9   VP                  WVR 4      G Rj  xL
 pV^ 8X  d   \        R4      hWE,          pK>  V#  L"5i)rC   Nrm   )rT   rn   sock_recv_intorp   )rc   rd   r=   rq   
bytes_readchunk_lengths   &&&   r*   r   r     sa      
If%	&BJ

!00*+GG1-.."
I	 Hs   4AA#APyPyc               $    V ^8  d   QhRRRRRR/# )r!   rc   r   deadlineOptional[float]r&   r'   r(   )r)   s   "r*   r+   r+   $  s!     . .
 .o .$ .r,   c                0   V P                   P                  pRpVP                  4       R8X  d   R#  \        VR4      '       d   VP	                  4       ^ 8  d   RpMlV'       dA   V\
        P                  ! 4       ,
          pV^ 8:  d   Rp\        \        V\        4      ^ 4      pM\        pV P                  P                  VRVR7      pV P                  P                  '       d   \        R4      hV'       d   R# V'       g   K  \        P                   ! R4      h)	zABlock until at least one byte is read, or a timeout, or a cancel.FNTpending)rs   r0   operation cancelledr1   rS   )rc   r"   rX   hasattrr   time	monotonicr{   r|   r   socket_checkerselectr   r   r   r<   r0   )rc   r   r"   	timed_outreadable	remainingr0   s   &&     r*   wait_for_readr   $  s    99>>DI{{}
4##(:H $t~~'77	 > $Ic)];Q?'**11$T71SH(((%&;<<9..--r,   c               (    V ^8  d   QhRRRRRRRR/# )	r!   rc   r   rd   re   r   r   r&   rT   r(   )r)   s   "r*   r+   r+   E  s(     < <z <3 </ <j <r,   c                D   \        V4      p\        V4      p^ pV P                  P                  4       p WQ8  Ed    \        '       g   \
        '       da   \        W4       \        P                  ! 4       '       d:   Ve6   V P                  \        V\        P                  ! 4       ,
          ^ 4      4       MPVe6   \        \        V\        P                  ! 4       ,
          ^ 4      \        4      pM\        pV P                  V4       V P                  P                  WER 4      pT^ 8X  d   \/        R4      hYX,          pEK
   V P                  V4       V#   \          dA    T P"                  P$                  '       d   \'        R4      Rh\(        P*                  ! R4      Rh\(        P*                   d~    T P"                  P$                  '       d   \'        R4      Rh\        '       gD   \
        '       g8   T P,                  '       g'   Te#   T\        P                  ! 4       ,
          ^ 8  d   h  EK  \.         dT   p	T P"                  P$                  '       d   \'        R4      Rh\1        T	4      \2        P4                  8X  d    Rp	?	EKO  h Rp	?	ii ; i  T P                  T4       i ; i)rC   Nr   r1   rm   )rn   rT   rc   r2   _PYPY_WINDOWSr   r   get_timeoutset_conn_timeoutr{   r   r   r|   r   ro   rW   r   r   r   r<   r0   is_sdamrp   r   errnoEINTR)
rc   rd   r   r$   rq   r   orig_timeoutshort_timeoutr   r>   s
   &&&       r*   receive_datar   E  s   
F
C	CBJ 99'')L.,!& 5HH!$1((**x/C--c(T^^=M2Mq.QR+(+C4>>;K0KQ,OQ^(_(5))-8#yy222k?C2 q 122&JW "Z 	l+I? & <&&000-.CD$Nnn[1t;>> &&000-.CD$NEx<<< , 4>>#33a7  &&000-.CD$N(-< 	l+s~   J E E CE !J &J	95J	/J	J	$J	0J	&J	(J ,J	5J	6AJ<J JJ		J Jc                      ] tR tRtR R lt]R R l4       tR R ltR R	 ltR
 R lt	]R R l4       t
]R R l4       tRtR# )NetworkingInterfaceBasei  c                   V ^8  d   QhRR/# )r!   rc   r	   r(   )r)   s   "r*   r+   $NetworkingInterfaceBase.__annotate__  s      S r,   c                	    Wn         R # rJ   r   )selfrc   s   &&r*   __init__ NetworkingInterfaceBase.__init__  s    	r,   c                   V ^8  d   QhRR/# r!   r&   r	   r(   )r)   s   "r*   r+   r     s     " "C "r,   c                	    \         hrJ   NotImplementedErrorr   s   &r*   r2   "NetworkingInterfaceBase.gettimeout      !!r,   c                    V ^8  d   QhRRRR/# r!   r0   float | Noner&   r'   r(   )r)   s   "r*   r+   r     s     " ", "4 "r,   c                	    \         hrJ   r   r   r0   s   &&r*   r3   "NetworkingInterfaceBase.settimeout      !!r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r     s     " "s "r,   c                	    \         hrJ   r   r   s   &r*   closeNetworkingInterfaceBase.close  r   r,   c                   V ^8  d   QhRR/# r!   r&   boolr(   )r)   s   "r*   r+   r     s     " "D "r,   c                	    \         hrJ   r   r   s   &r*   
is_closing"NetworkingInterfaceBase.is_closing  r   r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r     s     " "# "r,   c                	    \         hrJ   r   r   s   &r*   get_conn NetworkingInterfaceBase.get_conn  r   r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r     s     " "c "r,   c                	    \         hrJ   r   r   s   &r*   r"   NetworkingInterfaceBase.sock  r   r,   r   N)__name__
__module____qualname____firstlineno__r   propertyr2   r3   r   r   r   r"   __static_attributes__r(   r,   r*   r   r     sR     " """" " " " "r,   r   c                     a  ] tR tRtR V 3R llt]R R l4       tR R ltR R	 ltR
 R lt	]R R l4       t
]R R l4       tRtV ;t# )AsyncNetworkingInterfacei  c                   V ^8  d   QhRR/# )r!   rc   z!tuple[Transport, PyMongoProtocol]r(   )r)   s   "r*   r+   %AsyncNetworkingInterface.__annotate__  s      > r,   c                	&   < \         SV `  V4       R # rJ   superr   r   rc   	__class__s   &&r*   r   !AsyncNetworkingInterface.__init__      r,   c                   V ^8  d   QhRR/# r!   r&   r   r(   )r)   s   "r*   r+   r     s     ' 'L 'r,   c                	<    V P                   ^,          P                  #    rc   r2   r   s   &r*   r2   #AsyncNetworkingInterface.gettimeout  s    yy|&&&r,   c                    V ^8  d   QhRRRR/# r   r(   )r)   s   "r*   r+   r     s     ) ), )4 )r,   c                	J    V P                   ^,          P                  V4       R# r   Nrc   r3   r   s   &&r*   r3   #AsyncNetworkingInterface.settimeout  s    		!(r,   c                   V ^8  d   QhRR/# r!   r&   r'   r(   )r)   s   "r*   r+   r     s     ) )T )r,   c                	   "   V P                   ^,          P                  4        V P                   ^,          P                  4       G Rj  xL
  R#  L5ir   )rc   r   wait_closedr   s   &r*   r   AsyncNetworkingInterface.close  s3     		!iil&&(((s   AAA	Ac                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r     s     ) )D )r,   c                	D    V P                   ^ ,          P                  4       # )rC   rc   r   r   s   &r*   r   #AsyncNetworkingInterface.is_closing  s    yy|&&((r,   c                   V ^8  d   QhRR/# )r!   r&   PyMongoProtocolr(   )r)   s   "r*   r+   r     s      / r,   c                	(    V P                   ^,          # r   r   r   s   &r*   r   !AsyncNetworkingInterface.get_conn  s    yy|r,   c                   V ^8  d   QhRR/# )r!   r&   r   r(   )r)   s   "r*   r+   r     s     5 5m 5r,   c                	F    V P                   ^ ,          P                  R4      # )rC   r<   )rc   get_extra_infor   s   &r*   r"   AsyncNetworkingInterface.sock  s    yy|**844r,   r(   )r   r   r   r   r   r   r2   r3   r   r   r   r"   r   __classcell__r   s   @r*   r   r     sX      ' ')))   5 5r,   r   c                     a  ] tR tRtR V 3R lltR R ltR R ltR R	 ltR
 R lt]	R R l4       t
]	R R l4       tR R ltR R ltRtV ;t# )NetworkingInterfacei  c                   V ^8  d   QhRR/# )r!   rc   r#   r(   )r)   s   "r*   r+    NetworkingInterface.__annotate__  s      ; r,   c                	&   < \         SV `  V4       R # rJ   r   r   s   &&r*   r   NetworkingInterface.__init__  r   r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r    s     & &L &r,   c                	6    V P                   P                  4       # rJ   r   r   s   &r*   r2   NetworkingInterface.gettimeout      yy##%%r,   c                    V ^8  d   QhRRRR/# r   r(   )r)   s   "r*   r+   r    s     & &, &4 &r,   c                	<    V P                   P                  V4       R # rJ   r   r   s   &&r*   r3   NetworkingInterface.settimeout  s    		W%r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r    s      t r,   c                	:    V P                   P                  4        R # rJ   )rc   r   r   s   &r*   r   NetworkingInterface.close  s    		r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r    s     & &D &r,   c                	6    V P                   P                  4       # rJ   r  r   s   &r*   r   NetworkingInterface.is_closing  r  r,   c                   V ^8  d   QhRR/# r!   r&   r#   r(   )r)   s   "r*   r+   r    s      8 r,   c                	    V P                   # rJ   r   r   s   &r*   r   NetworkingInterface.get_conn      yyr,   c                   V ^8  d   QhRR/# r!  r(   )r)   s   "r*   r+   r    s      4 r,   c                	    V P                   # rJ   r   r   s   &r*   r"   NetworkingInterface.sock  r$  r,   c                   V ^8  d   QhRR/# )r!   r&   re   r(   )r)   s   "r*   r+   r    s     " " "r,   c                	6    V P                   P                  4       # rJ   )rc   rX   r   s   &r*   rX   NetworkingInterface.fileno  s    yy!!r,   c                    V ^8  d   QhRRRR/# )r!   bufferzbytes | memoryviewr&   re   r(   )r)   s   "r*   r+   r    s     + + 2 +s +r,   c                	8    V P                   P                  V4      # rJ   )rc   ro   )r   r,  s   &&r*   ro   NetworkingInterface.recv_into  s    yy""6**r,   r(   )r   r   r   r   r   r2   r3   r   r   r   r   r"   rX   ro   r   r  r  s   @r*   r  r    sX     &&&    "+ +r,   r  c                      ] tR tRtR R R lltR R lt]R R l4       tR	 R
 ltR R lt	R R lt
R R ltR R ltR R ltR R ltR R R lltR R R lltR R R lltR R ltRtR# )!r  i  Nc                   V ^8  d   QhRR/# )r!   r0   r   r(   )r)   s   "r*   r+   PyMongoProtocol.__annotate__  s     R R Rr,   c                	   R V n         \        \        ^4      4      V n        ^ V n        \        \        ^	4      4      V n        ^ V n        R V n        ^ V n        RV n	        RV n
        ^ V n        ^ V n        RV n        R V n        Wn        RV n        R V n        \$        V n        R V n        \*        P,                  ! 4       P/                  4       V n        \2        P4                  ! 4       V n        \2        P4                  ! 4       V n        R # )NTF)	transportrT   rn   _header_header_index_compression_header_compression_index_message_message_index_expecting_header_expecting_compression_message_size_op_code_connection_lost_read_waiter_timeout_is_compressed_compressor_idr   _max_message_size_response_tor4   r5   rY   _closedcollectionsdeque_pending_messages_done_messagesr   s   &&r*   r   PyMongoProtocol.__init__  s    $( ")B-0#-il#; "#.2!%&+# %37#-1!1+///1??AALARARAT>I>O>O>Qr,   c                    V ^8  d   QhRRRR/# r   r(   )r)   s   "r*   r+   r1    s        ,  4  r,   c                	    Wn         R # rJ   r@  r   s   &&r*   r3   PyMongoProtocol.settimeout  s    r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r1    s      L r,   c                    V P                   # )zGThe configured timeout for the socket that underlies our protocol pair.rM  r   s   &r*   r2   PyMongoProtocol.gettimeout  s     }}r,   c                    V ^8  d   QhRRRR/# )r!   r3  r   r&   r'   r(   )r)   s   "r*   r+   r1    s     S S S4 Sr,   c                Z    Wn         V P                   P                  \        \        4       R# )zCalled exactly once when a connection is made.
The transport argument is the transport representing the write side of the connection.
N)r3  set_write_buffer_limitsr   )r   r3  s   &&r*   connection_madePyMongoProtocol.connection_made  s     #../?AQRr,   c                    V ^8  d   QhRRRR/# )r!   messager%   r&   r'   r(   )r)   s   "r*   r+   r1    s     ( (5 (T (r,   c                   "   V P                   P                  4       '       d   \        R4      hV P                   P                  V4       V P                   P	                  4        R# 5i)z/Write a message to this connection's transport.zConnection is closedN)r3  r   rp   writeresume_reading)r   rX  s   &&r*   rZ  PyMongoProtocol.write  sF     >>$$&&011W%%%'s   A#A%c               $    V ^8  d   QhRRRRRR/# )r!   
request_idOptional[int]max_message_sizere   r&   ztuple[bytes, int]r(   )r)   s   "r*   r+   r1  	  s"      +  +]  +c  +N_  +r,   c                l  "   V P                   '       d    V P                   P                  4        W n        V P
                  '       d$   V P
                  P                  4       G Rj  xL
 pMV P                   '       d,   V P                   P                  4       '       d   \        R4      h\        P                  ! 4       P                  4       pV P                  P                  V4        VG Rj  xL
 pW@P
                  9   d   V P
                  P                  V4       V'       d5   Vw  rVrxVe   W8w  d   \        RV: RV: 24      hVe   \        W4      pW3# \        R4      h  \         d    \        R4      Rhi ; i EL L  Y@P
                  9   d   T P
                  P                  T4       i i ; i5i)zARead a single MongoDB Wire Protocol message from this connection.zconnection is already closedNGot response id  but expected rm   )r3  r[  AttributeErrorrp   rC  rI  popleftr   r4   r5   rY   rH  appendremover   r   )	r   r^  r`  rX  read_waiterop_codecompressor_idresponse_todatas	   &&&      r*   rs   PyMongoProtocol.read	  s{    >>>H--/ "2 //7799G~~~$..";";"="=<==!224BBDK""))+6< ++"5"55''..{;8?5GK%,'*;/
~V  (!$6= )**5 " H<=4GH : ,"5"55''..{; 6sd   F4E# 5F4%E>&F4=F4A	F4'F ,F-F 12F4$?F4#E;;F4F .F11F4c                    V ^8  d   QhRRRR/# )r!   sizehintre   r&   rT   r(   )r)   s   "r*   r+   r1  +  s     4 43 4: 4r,   c                r   V P                   '       d8   V P                  '       g   \        \        R4      4      V n        V P                  # V P                  '       d   V P
                  V P                  R # V P                  '       d   V P                  V P                  R # V P                  V P                  R # )a  Called to allocate a new receive buffer.
The asyncio loop calls this method expecting to receive a non-empty buffer to fill with data.
If any data does not fit into the returned buffer, this method will be called again until
either no data remains or an empty buffer is returned.
Ni @  )r>  r8  rT   rn   r:  r4  r5  r;  r6  r7  r9  )r   ro  s   &&r*   
get_bufferPyMongoProtocol.get_buffer+  s        === *9U+; <==  !!!<< 2 2 455&&&++D,C,C,EFF}}T00233r,   c                    V ^8  d   QhRRRR/# )r!   nbytesre   r&   r'   r(   )r)   s   "r*   r+   r1  @  s     9% 9%S 9%T 9%r,   c                r   V^ 8X  d   V P                  \        R4      4       R# V P                  '       d   R# V P                  '       d   V ;P                  V,          un        V P                  ^8  dU   RV n         V P                  4       w  V n        V n        V n        V n	        \        \        T P                  4      4      T n        R# V P                  '       dQ   V ;P                  V,          un        V P                  ^	8  d%   RV n	        V P                  4       w  V n        V n        R# V ;P"                  V,          un        V P"                  V P                  8  Ed-   RV n        V P$                  P'                  4        V P(                  '       d   V P(                  P+                  4       pM#\,        P.                  ! 4       P1                  4       pVP3                  4       '       d   V P                  R4       R# VP5                  V P                  V P                   V P                  V P                  34       V P6                  P9                  V4       ^ V n        ^ V n        ^ V n        ^ V n        RV n        ^ V n        RV n        RV n        R# R#   \         d   pT P                  T4        Rp?R# Rp?ii ; i)z9Called when the buffer was updated with the received datarm   NFT)r   rp   r>  r:  r5  process_headerr<  r=  rD  r;  r   rT   rn   r8  r7  process_compression_headerrB  r9  r3  pause_readingrH  re  r4   r5   rY   rL   rM   rI  rf  )r   rt  r>   results   &&  r*   buffer_updatedPyMongoProtocol.buffer_updated@  s0    Q;JJw234   !!!&(!!R').&	 ++-*)3
 !+9T5G5G+H I&&&##v-#&&!+.3+595T5T5V2t2v%$"4"44%)D"NN((*%%%//779 113AAC{{}}

4  3 3T5F5FV &&v.!"D&'D#"#D!"D DMDM"&D $D3 5 % JJsOs   <)J J6J11J6c                   V ^8  d   QhRR/# )r!   r&   ztuple[int, int, int, bool]r(   )r)   s   "r*   r+   r1  {  s     H H : Hr,   c                *   \        V P                  4      w  rr4RpVR8X  d#   V^8:  d   \        RV: R24      hRpV^	,          pV^8:  d   \        RV: R24      hWP                  8  d   \        RV: RV P                  : R24      hV^,
          WCV3# )	z&Unpack a MongoDB Wire Protocol header.F  Message length (zA) not longer than standard OP_COMPRESSED message header size (25)T3) not longer than standard message header size (16)*) is larger than server max message size ())_UNPACK_HEADERr4  r   rC  )r   rd   _rk  ri  expecting_compressions   &     r*   rv  PyMongoProtocol.process_header{  s    *8*F'; %d?|#&vj0qr  %)!aKFR<"6*,_`  ***"6* -!!%!7!7 :!= 
 {G2GGGr,   c                   V ^8  d   QhRR/# )r!   r&   ztuple[int, int]r(   )r)   s   "r*   r+   r1    s     & &O &r,   c                8    \        V P                  4      w  rpW3# )z2Unpack a MongoDB Wire Protocol compression header.)_UNPACK_COMPRESSION_HEADERr6  )r   ri  r  rj  s   &   r*   rw  *PyMongoProtocol.process_compression_header  s     $>t?W?W$X!M%%r,   c                    V ^8  d   QhRRRR/# r!   r>   zOptional[Exception]r&   r'   r(   )r)   s   "r*   r+   r1    s     , ,-@ ,D ,r,   c                	    \        V P                  4      pV F[  pVP                  4       '       g(   Vf   VP                  R 4       MVP	                  V4       V P
                  P                  V4       K]  	  R # rJ   )listrH  rL   rM   set_exceptionrI  rf  )r   r>   r   msgs   &&  r*   _resolve_pending_messages)PyMongoProtocol._resolve_pending_messages  sZ    t--.C88::;NN4(%%c*&&s+ r,   c                    V ^8  d   QhRRRR/# r  r(   )r)   s   "r*   r+   r1    s     % %, % %r,   c                	j    V P                   P                  4        V P                  V4       R V n        R# r   )r3  abortr  r>  r   r>   s   &&r*   r   PyMongoProtocol.close  s(    &&s+ $r,   c                    V ^8  d   QhRRRR/# r  r(   )r)   s   "r*   r+   r1    s     * *#6 *$ *r,   c                	    V P                  V4       V P                  P                  4       '       g   V P                  P                  R 4       R # R # rJ   )r  rE  rL   rM   r  s   &&r*   connection_lostPyMongoProtocol.connection_lost  s:    &&s+||  ""LL##D) #r,   c                   V ^8  d   QhRR/# r   r(   )r)   s   "r*   r+   r1    s      4 r,   c                	:   "   V P                   G R j  xL
  R #  L5irJ   )rE  r   s   &r*   r   PyMongoProtocol.wait_closed  s     lls   )rE  r6  r7  rB  r>  rI  r;  r:  r4  r5  rA  rC  r8  r9  r<  r=  rH  r?  rD  r@  r3  rJ   )r   r   r   r   r   r3   r   r2   rU  rZ  rs   rq  rz  rv  rw  r  r   r  r   r   r(   r,   r*   r  r    sa    R4   S( +D4*9%vH.&
,%
*
 r,   r  c               $    V ^8  d   QhRRRRRR/# )r!   rc   r  r$   r%   r&   r'   r(   )r)   s   "r*   r+   r+     s!     3 3o 3E 3d 3r,   c                   "    \         P                  ! V P                  V4      V P                  R 7      G Rj  xL
  R#  L  \         P                   d   p\
        P                  ! R4      ThRp?ii ; i5i)r/   Nr1   )r4   r8   rZ  r2   r;   r<   r0   )rc   r$   r>   s   && r*   async_sendallr    sR     3tzz#HHH 3nn[)s23s5   A54A ?A A5A A2A--A22A5c               (    V ^8  d   QhRRRRRRRR/# )	r!   rc   r   r^  r_  r`  re   r&   Union[_OpReply, _OpMsg]r(   )r)   s   "r*   r+   r+     s0     0 0
00 0 	0r,   c                  "   V P                   P                  p\        P                  ! 4       '       d   \        P                  ! 4       pM'V'       d   \
        P                  ! 4       V,           pMRpV'       d'   \        V\
        P                  ! 4       ,
          ^ 4      p\        \        V 4      4      p\        V P                   P                  P                  W4      4      pWe.p \        P                  ! Ws\        P                  R7      G Rj  xL
 w  rV	 F  p
V
P                  4        K  	  V	'       d   \        P                  ! V	4      G Rj  xL
  \!        V4      ^ 8X  d   \"        P$                  ! R4      hWh9   d)   VP'                  4       w  r \(        V,          pT! T4      # \1        R4      h L Le  \*         d)    \-        RT: R\(        P.                  ! 4       : 24      Rhi ; i  \        P2                   d;    T F  p
T
P                  4        K  	  \        P                  ! T4      G Rj  xL 
  h i ; i5i)1Receive a raw BSON message or raise socket.error.N)r0   return_whenr1   Got opcode rc  r   )rc   r2   r   r   get_deadliner   r   r{   r   r   r   rs   r4   waitFIRST_COMPLETEDcancelrU   r<   r0   ry  r   KeyErrorr   keysr   CancelledError)rc   r^  r`  r0   r   cancellation_task	read_tasktasksrL   r   taskrl  ri  unpack_replys   &&&           r*   async_receive_messager    s     ii""G%%'~~''1HH h!1115#$6t$<=DII..33JQRI*E%ll0G0G
 
 DKKM ,,w'''t9>..--%,,.MD,W5
  %%!"788%
 (  #!'N=;M;M;O:RS !! DKKM ll5!!!	s{   AH?&H?9A+H?%)G- F3&G- 6G- F5AG- F7  G- 'H?(G- 5G- 73G**G- -AH<4H75H<<H?c               (    V ^8  d   QhRRRRRRRR/# )	r!   rc   r   r^  r_  r`  re   r&   r  r(   )r)   s   "r*   r+   r+     s,     ( (
("/(CF((r,   c                   \         P                  ! 4       '       d   \         P                  ! 4       pMAV P                  P	                  4       pV'       d   \
        P                  ! 4       V,           pMRp\        \        V ^V4      4      w  rVrxVe   W8w  d   \        RV: RV: 24      hV^8:  d   \        RV: R24      hWR8  d   \        RV: RV: R24      hVR8X  d8   \        \        V ^	V4      4      w  rp	\        \        W^,
          V4      V	4      p
M\        W^,
          V4      p
 \        V,          pT! T
4      #   \         d)    \        R	T: R\        P                  ! 4       : 24      Rhi ; i)
r  Nrb  rc  r  r  r  r  r~  r  )r   r   r  rc   r2   r   r   r  r   r   r  r   r   r  r  )rc   r^  r`  r   r0   rd   r  rk  ri  rj  rl  r  s   &&&         r*   receive_messager    sz    %%'))&&(~~''1HH&4\$H5U&V#F{$"2;/PZ~ ^__|vj([\
 	
  vj )-03
 	

 $$>|DRSU]?^$_!M,tb[(C]SD2+x8$W-
 	  'N=3E3E3G2JK
	s   ,E 3E4)F)Q__doc__
__future__r   r4   rF  r   r<   structsysr   r   r   r   r   r   typingr   r	   r
   r   pymongor   r   pymongo._asyncio_taskr   pymongo.commonr   pymongo.compression_supportr   pymongo.errorsr   r   pymongo.messager   r   r   pymongo.socket_checkerr   sslr   r   r6   ImportErrorpymongo.pyopenssl_contextr   r^   pymongo.ssl_supportr   r   r   pymongo.asynchronous.poolr   pymongo.synchronous.poolr   Structunpackr  r  r   BlockingIOErrorrW   r?   platformr9   rt   r   r   r   r   versionr   r   r   r   r   r   r  r  r  r  r  r(   r,   r*   <module>r     s   - "      
  Y Y  ' - + 2 = ; ; 8'I2O
  93w'..#]]6299 %b(@b;CaCab 
!  <<7)/V0 0l*6+&2
 	#++<<7".B<~" "456 56+1 +>T& Tn3 -0h JZ( ({  I  OHs$   2
F* =F: *	F76F7:G	G	