+
    üÐj}w  ã                  ó¢  € R t ^ RIHt ^ RIt^ RIHtHtHtHtH	t	H
t
HtHtHtHtHt ^ RIHt ^ RIHtHtHtHtHt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#H$t$ ^ R
I%H&t& ^ RI'H(t( ^ RI)H*t* ^ RI+H,t,H-t-  ! R R4      t. ! R R].]P^                  4      t0 ! R R].]Pb                  4      t2 ! R R]04      t3 ! R R]44      t5 ! R R]P^                  4      t6]! ]Pn                  ! ]R4      '       * R4       ! R R]-4      4       t8]! ]Pn                  ! ]R4      '       * R4       ! R R]-4      4       t9R R  lt:]! ]PF                  ! ]R4      '       * R!4      ]! ]:! ]]]R"R#4      '       * R$4       ! R% R&]-4      4       4       t;]! ]PF                  ! ]R4      '       * R!4      ]*]! ]:! ]]	]
R'R(4      '       * R)4       ! R* R+];4      4       4       4       t<R# ),zG
Tests for implementations of L{IReactorUDP} and L{IReactorMulticast}.
)ÚannotationsN)ÚAF_INETÚAF_INET6ÚIP_ADD_MEMBERSHIPÚ
IPPROTO_IPÚIPPROTO_IPV6ÚIPV6_JOIN_GROUPÚ
SOCK_DGRAMÚAddressFamilyÚif_nameindexÚ	inet_ptonÚsocket)ÚskipIf)ÚdeferÚerrorÚ
interfacesÚprotocolÚreactorÚudp)ÚIPv4AddressÚIPv6Address)ÚDeferredÚgatherResultsÚmaybeDeferred)ÚMulticastJoinError)ÚIMulticastTransportÚIReactorMulticastÚIReactorTime)Ú
deferLater)Úruntime)ÚskipWithoutIPv6)ÚSkipTestÚTestCasec                  ó4   € ] tR t^*t^ t^ tRtR tR tR t	Rt
R# )ÚMixinNc                	ó   € . V n         R # ©N)Úpackets©Úselfs   &Ú7/usr/lib/python3/dist-packages/twisted/test/test_udp.pyÚ__init__ÚMixin.__init__0   s	   € ØˆŽó    c                	ó|   € ^V n         V P                  e'   V P                  Ruqn        VP                  R4       R# R# ©é   N)ÚstartedÚstartedDeferredÚcallback©r)   Úds   & r*   ÚstartProtocolÚMixin.startProtocol3   s9   € ØˆŒØ×ÑÒ+Ø&*×&:Ñ&:¸DÐ#ˆAÔ#Ø�J‰J�tÖñ ,r-   c                	ó   € ^V n         R# r/   )Ústoppedr(   s   &r*   ÚstopProtocolÚMixin.stopProtocol9   s	   € ØˆŽr-   )r'   r1   r2   r9   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r1   r9   r2   r+   r6   r:   Ú__static_attributes__© r-   r*   r$   r$   *   s    † Ø€GØ€Gà€Oòòör-   r$   c                  ó:   € ] tR t^=t$ RtR]R&   ^ tR]R&   R tRtR# )ÚServerNzDeferred[None] | NoneÚpacketReceivedr   Ú	transportc                	ó¦   € V P                   P                  W34       V P                  e'   V P                  R uq0n        VP                  R 4       R # R # r&   ©r'   ÚappendrD   r3   )r)   ÚdataÚaddrr5   s   &&& r*   ÚdatagramReceivedÚServer.datagramReceivedB   sF   € Ø�‰×Ñ˜T˜LÔ)Ø×ÑÒ*Ø%)×%8Ñ%8¸$Ð"ˆAÔ"Ø�J‰J�tÖñ +r-   )rD   )	r<   r=   r>   r?   rD   Ú__annotations__ÚrefusedrK   r@   rA   r-   r*   rC   rC   =   s   ‡ Ø,0€NÐ)Ó0Ø€GØ"Ó"ör-   rC   c                  ó0   € ] tR t^ItRt^ tR tR tR tRt	R# )ÚClientNc                	ó¤   € V P                   P                  V4       V P                  e'   V P                  R uq n        VP                  R 4       R # R # r&   rG   )r)   rI   r5   s   && r*   rK   ÚClient.datagramReceivedM   sD   € Ø�‰×Ñ˜DÔ!Ø×ÑÒ*Ø%)×%8Ñ%8¸$Ð"ˆAÔ"Ø�J‰J�tÖñ +r-   c                	óv   € V P                   e%   V P                   R uq n         VP                  V4       Wn        R # r&   )r2   ÚerrbackÚfailure)r)   rU   r5   s   && r*   ÚconnectionFailedÚClient.connectionFailedS   s2   € Ø×ÑÒ+Ø&*×&:Ñ&:¸DÐ#ˆAÔ#Ø�I‰I�gÔØŽr-   c                	ó    € V P                   e9   V P                   R uqn         VP                  \        P                  ! R4      4       ^V n        R # ©NÚyup©r2   rT   r   ÚConnectionRefusedErrorrN   r4   s   & r*   ÚconnectionRefusedÚClient.connectionRefusedY   ó?   € Ø×ÑÒ+Ø&*×&:Ñ&:¸DÐ#ˆAÔ#Ø�I‰I”e×2Ò2°5Ó9Ô:ØˆŽr-   )rU   rD   rN   r2   )
r<   r=   r>   r?   rD   rN   rK   rV   r]   r@   rA   r-   r*   rP   rP   I   s   † Ø€NØ€Gòòör-   rP   c                  ó   € ] tR t^`tR tRtR# )Ú
GoodClientc                	ó    € V P                   e9   V P                   R uqn         VP                  \        P                  ! R4      4       ^V n        R # rY   r[   r4   s   & r*   r]   ÚGoodClient.connectionRefuseda   r_   r-   )rN   r2   N)r<   r=   r>   r?   r]   r@   rA   r-   r*   ra   ra   `   s   † ör-   ra   c                  ó   € ] tR t^htRtRtR# )ÚBadClientErrorzZ
Raised by BadClient at the end of every datagramReceived call to try and
screw stuff up.
rA   N)r<   r=   r>   r?   Ú__doc__r@   rA   r-   r*   re   re   h   s   † õr-   re   c                  ó*   € ] tR t^otRtRtR tR tRtR# )Ú	BadClientz‘
A DatagramProtocol which always raises an exception from datagramReceived.
Used to test error handling behavior in the reactor for that method.
Nc                ó   € Wn         R# )zM
Set the Deferred which will be called back when datagramReceived is
called.
N©r5   r4   s   &&r*   ÚsetDeferredÚBadClient.setDeferredw   s	   € ð
 Žr-   c                	ó|   € V P                   e%   V P                   R uq0n         VP                  V4       \        R4      h)NzApplication code is very buggy!)r5   r3   re   )r)   ÚbytesrJ   r5   s   &&& r*   rK   ÚBadClient.datagramReceived~   s3   € Ø�6‰6ÒØŸ™ ˆIˆAŒvØ�J‰J�uÔÜÐ>Ó?Ð?r-   rj   )	r<   r=   r>   r?   rf   r5   rk   rK   r@   rA   r-   r*   rh   rh   o   s   † ñð
 	€Aòö@r-   rh   ú!This reactor does not support UDPc                  ó¢   € ] tR t^…tR tR tR tR tR t]	! ]
P                  P                  R4      R8H  R4      R	 4       tR
 tR tR tR tRtR# )ÚUDPTestsc                ó²   a a€ \        4       p\        P                  ! 4       ;q!n        \        P
                  ! ^ VRR7      oVV 3R lpVP                  V4      # )z]
The C{type} of the host address of a listening L{DatagramProtocol}'s
transport is C{"UDP"}.
ú	127.0.0.1©Ú	interfacec                ó|   <€ SP                  4       pSP                  VP                  R 4       SP                  4       # )ÚUDP)ÚgetHostÚassertEqualÚtypeÚstopListening)ÚignoredrJ   Úpr)   s   & €€r*   Ú	cbStartedÚ+UDPTests.test_oldAddress.<locals>.cbStarted�   s/   ø€ Ø—9‘9“;ˆDØ×Ñ˜TŸY™Y¨Ô.Ø—?‘?Ó$Ð$r-   ©rC   r   r   r2   r   Ú	listenUDPÚaddCallback)r)   Úserverr5   r   r~   s   f   @r*   Útest_oldAddressÚUDPTests.test_oldAddress‡   sH   ù€ ô
 “ˆÜ%*§^¢^Ó%5Ð5ˆÔ"Ü×Ò˜a °;Ô?ˆö	%ð
 �}‰}˜YÓ'Ð'r-   c                óä   a aa€ \        4       o\        P                  ! 4       ;pSn        \        P
                  ! ^ SRR7      oVV V3R lpV V3R lpVP                  V4      P                  V4      # )z‘
The L{DatagramProtocol}'s C{startProtocol} and C{stopProtocol}
methods are called when its transports starts and stops listening,
respectively.
rt   ru   c                ó”   <€ SP                  SP                  ^4       SP                  SP                  ^ 4       SP                  4       # )r0   )rz   r1   r9   r|   )r}   Úport1r)   r„   s   &€€€r*   r   Ú*UDPTests.test_startStop.<locals>.cbStarted¡   s:   ø€ Ø×Ñ˜VŸ^™^¨QÔ/Ø×Ñ˜VŸ^™^¨QÔ/Ø×&Ñ&Ó(Ð(r-   c                ó@   <€ SP                  SP                  ^4       R# r/   )rz   r9   )r}   r)   r„   s   &€€r*   Ú	cbStoppedÚ*UDPTests.test_startStop.<locals>.cbStopped¦   s   ø€ Ø×Ñ˜VŸ^™^¨QÖ/r-   r�   )r)   r5   r   rŒ   r‰   r„   s   f   @@r*   Útest_startStopÚUDPTests.test_startStop—   sZ   ú€ ô “ˆÜ%*§^¢^Ó%5Ð5ˆˆFÔ"Ü×!Ò! ! V°{ÔCˆ÷	)ö
	0ð �}‰}˜YÓ'×3Ñ3°IÓ>Ð>r-   c                ó¼   aa€ \        4       o\        P                  ! 4       ;pSn        \        P
                  ! ^ SRR7      pR oVV3R lpVP                  SV4      # )zZ
Re-listening with the same L{DatagramProtocol} re-invokes the
C{startProtocol} callback.
rt   ru   c                ó"   € VP                  4       # r&   ©r|   ©r}   Úports   &&r*   r   Ú'UDPTests.test_rebind.<locals>.cbStarted´   s   € Ø×%Ñ%Ó'Ð'r-   c                ó’   <€ \         P                  ! 4       ;pSn        \        P                  ! ^ SRR7      pVP                  SV4      # ©é    rt   ru   )r   r   r2   r   r‚   rƒ   )r}   r5   r~   r   r„   s   &  €€r*   rŒ   Ú'UDPTests.test_rebind.<locals>.cbStopped·   s<   ø€ Ü).¯ªÓ)9Ð9ˆA�Ô&Ü×!Ò! ! V°{ÔCˆAØ—=‘= ¨AÓ.Ð.r-   r�   )r)   r5   r~   rŒ   r   r„   s   &   @@r*   Útest_rebindÚUDPTests.test_rebind«   sQ   ù€ ô
 “ˆÜ%*§^¢^Ó%5Ð5ˆˆFÔ"Ü×Ò˜a °;Ô?ˆò	(ö	/ð
 �}‰}˜Y¨Ó*Ð*r-   c                óê   a aa€ \        4       o\        P                  ! 4       ;pSn        \        P
                  ! ^ SRR7      oVV V3R lpVP                  V4       V3R lpVP                  V4       V# )zx
A L{CannotListenError} exception is raised when attempting to bind a
second protocol instance to an already bound port
rt   ru   c                ó   <€ SP                  SP                  4       SP                  P                  4       4       \        4       pSP	                  \
        P                  \        P                  SP                  4       P                  VR R7       R# )rt   ru   N)
rz   ry   rE   rC   ÚassertRaisesr   ÚCannotListenErrorr   r‚   r”   )r}   Úserver2r”   r)   r„   s   & €€€r*   r   Ú*UDPTests.test_bindError.<locals>.cbStartedÇ   si   ø€ Ø×Ñ˜TŸ\™\›^¨V×-=Ñ-=×-EÑ-EÓ-GÔHÜ“hˆGØ×ÑÜ×'Ñ'Ü×!Ñ!Ø—‘“×#Ñ#ØØ%ð ö r-   c                ó$   <€ SP                  4       # r&   r’   r“   s   &€r*   Ú
cbFinishedÚ+UDPTests.test_bindError.<locals>.cbFinishedÔ   s   ø€ Ø×%Ñ%Ó'Ð'r-   r�   )r)   r5   r   r£   r”   r„   s   f   @@r*   Útest_bindErrorÚUDPTests.test_bindError¾   s_   ú€ ô
 “ˆÜ%*§^¢^Ó%5Ð5ˆˆFÔ"Ü× Ò   F°kÔBˆ÷		ð 	
�‰�iÔ õ	(ð 	
�‰�jÔ!Øˆr-   c                óž  a aaa	a
€ \        4       o
\        P                  ! 4       ;pS
n        \        P
                  ! ^ S
RR7      o	\        4       o\        P                  ! 4       ;oSn        VVV 3R lpVP                  V4      pVV
3R lpVP                  V4       VV V
3R lpVP                  V4       V	V 3R lpVP                  V4       V# )zv
Datagrams can be sent with the transport's C{write} method and
received via the C{datagramReceived} callback method.
rt   ru   c                óD   <€ \         P                  ! ^ SRR7      Sn        S# r—   )r   r‚   Úport2)r}   ÚclientÚclientStartedr)   s   &€€€r*   ÚcbServerStartedÚ2UDPTests.test_sendPackets.<locals>.cbServerStartedæ   s   ø€ Ü ×*Ò*¨1¨fÀÔLˆDŒJØ Ð r-   c                ó  <aa€ SP                   P                  R SP                   P                  4       P                  4       SP                   P                  4       pSP                   P                  4       p\        P
                  ! 4       ;pSn        SP                   P                  RVP                  VP                  34       RRRVP                  VP                  33.oVVVV3R lo\        P                  ! S! R4      V.RR7      # )	rt   ó   helloNó   cc                óÈ   <€ S'       dY   \         P                  ! 4       ;pSn        VP                  S4       SP                  P
                  ! SP                  ^ 4      !   V# R# ©r˜   N)r   r   rD   rƒ   rE   ÚwriteÚpop)r}   ÚnextClientWriteÚcbClientSendrª   ÚclientWritesr„   s   & €€€€r*   r¶   ÚHUDPTests.test_sendPackets.<locals>.cbClientStarted.<locals>.cbClientSendö   sR   ø€ ßÜ>C¿nºnÓ>NÐN�O fÔ&;Ø#×/Ñ/°Ô=Ø×$Ñ$×*Ò*¨L×,<Ñ,<¸QÓ,?Ò@Ø*Ð*ñ	  r-   T©ÚfireOnOneErrback)ó   a)ó   bN)
rE   Úconnectry   r”   r   r   rD   r³   ÚhostÚDeferredList)r}   ÚcAddrÚsAddrÚ
serverSendr¶   r·   rª   r„   s   &   @@€€r*   ÚcbClientStartedÚ2UDPTests.test_sendPackets.<locals>.cbClientStartedì   sÙ   ú€ Ø×Ñ×$Ñ$ [°&×2BÑ2B×2JÑ2JÓ2L×2QÑ2QÔRØ×$Ñ$×,Ñ,Ó.ˆEØ×$Ñ$×,Ñ,Ó.ˆEä16·²Ó1AÐAˆJ˜Ô.Ø×Ñ×"Ñ" 8¨e¯j©j¸%¿*¹*Ð-EÔFà# \°D¸5¿:¹:ÀuÇzÁzÐ:RÐ3SÐTˆL÷+ð +ô ×%Ò%Ù˜dÓ# ZÐ0À4ôð r-   c                óT  <€ SP                   P                  4       pSP                   P                  4       pSP                  SP                  R VP                  VP
                  33.4       VP                  VP
                  3pSP                  SP                  RV3RV3RV3.4       R# )r¯   r»   r¼   r°   N)rE   ry   rz   r'   r¾   r”   )r}   rÀ   rÁ   Ú
clientAddrrª   r)   r„   s   &   €€€r*   ÚcbSendsFinishedÚ2UDPTests.test_sendPackets.<locals>.cbSendsFinished  s”   ø€ Ø×$Ñ$×,Ñ,Ó.ˆEØ×$Ñ$×,Ñ,Ó.ˆEØ×Ñ˜VŸ^™^¨x¸%¿*¹*ÀeÇjÁjÐ9QÐ.RÐ-SÔTØŸ*™* e§j¡jÐ1ˆJØ×ÑØ—‘Ø˜
Ð# d¨JÐ%7¸$À
Ð9KÐLör-   c                óÄ   <€ \         P                  ! \         P                  ! SP                  4      \         P                  ! SP                  P                  4      .R R7      # ©Tr¹   )r   r¿   r   r|   r©   )r}   r‰   r)   s   &€€r*   r£   Ú-UDPTests.test_sendPackets.<locals>.cbFinished  sL   ø€ Ü×%Ò%ä×'Ò'¨×(;Ñ(;Ó<Ü×'Ò'¨¯
©
×(@Ñ(@ÓAðð "&ôð r-   )rC   r   r   r2   r   r‚   ra   rƒ   )r)   ÚserverStartedr¬   r5   rÃ   rÇ   r£   rª   r«   r‰   r„   s   f      @@@@r*   Útest_sendPacketsÚUDPTests.test_sendPacketsÚ   s¤   ü€ ô
 “ˆÜ16·²Ó1AÐAˆ˜Ô.Ü×!Ò! ! V°{ÔCˆä“ˆÜ16·²Ó1AÐAˆ˜Ô.÷	!ð ×%Ñ% oÓ6ˆö	ð0 	
�‰�oÔ&÷	ð 	
�‰�oÔ&ö	ð 	
�‰�jÔ!Øˆr-   ÚINFRASTRUCTUREÚAZUREPIPELINESz"Hangs on Pipelines due to firewallc                ó   a aaaa	€ \        4       o\        P                  ! 4       ;pSn        \        P
                  ! ^ SRR7      o\        4       o	\        P                  ! 4       ;pS	n        \        P
                  ! ^ S	RR7      o\        P                  ! W.RR7      pVV V	3R lpVP                  V4       VV3R lpVP                  V4       V# )z®
A L{ConnectionRefusedError} exception is raised when a connection
attempt is actively refused by the other end.

Note: This test assumes no one is listening on port 80 UDP.
rt   ru   Tr¹   c                óf  <€ \         P                  ! 4       ;pSn        SP                  P	                  R ^P4       \        ^
4       FJ  pSP                  P                  RV3,          4       SP                  P                  RV3,          R4       KL  	  SP                  V\        P                  4      # )rt   ó   %d©rt   éP   )
r   r   r2   rE   r½   Úranger³   ÚassertFailurer   r\   )r}   r]   Úirª   r)   r„   s   &  €€€r*   r   Ú2UDPTests.test_connectionRefused.<locals>.cbStarted3  s�   ø€ Ü9>¿ºÓ9IÐIÐ Ô 6Ø×Ñ×$Ñ$ [°"Ô5ä˜2–Y�Ø× Ñ ×&Ñ& u°¨t¥|Ô4Ø× Ñ ×&Ñ& u°¨t¥|Ð5FÖGñ ð ×%Ñ%Ð&7¼×9UÑ9UÓVÐVr-   c                ó°   <€ \         P                  ! \         P                  ! SP                  4      \         P                  ! SP                  4      .R R7      # rÊ   ©r   r¿   r   r|   )r}   r”   r©   s   &€€r*   r£   Ú3UDPTests.test_connectionRefused.<locals>.cbFinished?  sH   ø€ Ü×%Ò%ä×'Ò'¨×(:Ñ(:Ó;Ü×'Ò'¨×(;Ñ(;Ó<ðð "&ôð r-   )	ra   r   r   r2   r   r‚   rC   r¿   rƒ   )
r)   r«   rÌ   r5   r   r£   rª   r”   r©   r„   s
   f     @@@@r*   Útest_connectionRefusedÚUDPTests.test_connectionRefused  s¥   ü€ ô “ˆÜ16·²Ó1AÐAˆ˜Ô.Ü× Ò   F°kÔBˆä“ˆÜ16·²Ó1AÐAˆ˜Ô.Ü×!Ò! ! V°{ÔCˆä×Ò Ð=ÐPTÔUˆ÷	Wð 	
�‰�iÔ ö	ð 	
�‰�jÔ!Øˆr-   c                óD  a a	a
aaa€ \        4       o	\        P                  ! 4       ;pS	n        \        P
                  ! ^ S	RR7      o
Ro\        4       o\        P                  ! 4       ;pSn        \        P                  ! 4       ;pSn        \        P
                  ! ^ SRR7      o\        P                  ! W.RR7      pV	VVV3R lpVP                  V4       \        P                  ! WC.RR7      pV VV3R lpVP                  V4       V
V3R lpVP                  V4       V# )	aC  
When a server fails to successfully read a packet the server should
still be able to process future packets.
The IOCP reactor had a historical problem where a failure to read caused
the reactor to ignore any future reads. This test should prevent a regression.

Note: This test assumes no one is listening on port 80 UDP.
rt   ru   s   Sending test packet to serverTr¹   c                ó�   <€ SP                   P                  R R4       SP                   P                  SRSP                  34       R# )s$   write to port no one is listening tort   NrÔ   )rE   r³   Ú_realPortNumber)r}   rª   r„   Ú
serverPortÚtest_data_to_sends   &€€€€r*   ÚcbClientAndServerStartedÚAUDPTests.test_serverReadFailure.<locals>.cbClientAndServerStartedb  sE   ø€ ð ×Ñ×"Ñ"Ø7Ð9Jôð ×Ñ×"Ñ"Ø! K°×1KÑ1KÐ#Lör-   c                ó\   <€ SP                  SP                  ^ ,          ^ ,          S4       R# r²   )rz   r'   )r}   r)   r„   rã   s   &€€€r*   Úverify_server_got_dataÚ?UDPTests.test_serverReadFailure.<locals>.verify_server_got_datau  s"   ø€ Ø×Ñ˜VŸ^™^¨AÕ.¨qÕ1Ð3DÖEr-   c                ó°   <€ \         P                  ! \         P                  ! SP                  4      \         P                  ! SP                  4      .R R7      # rÊ   rÛ   )r}   Ú
clientPortrâ   s   &€€r*   ÚcleanupÚ0UDPTests.test_serverReadFailure.<locals>.cleanupz  sH   ø€ Ü×%Ò%ä×'Ò'¨
×(@Ñ(@ÓAÜ×'Ò'¨
×(@Ñ(@ÓAðð "&ôð r-   )
ra   r   r   r2   r   r‚   rC   rD   r¿   rƒ   )r)   r«   rÌ   ÚserverGotDataÚserver_client_started_drä   Úall_data_sentrç   rë   rª   rê   r„   râ   rã   s   f        @@@@@r*   Útest_serverReadFailureÚUDPTests.test_serverReadFailureK  sû   ý€ ô “ˆÜ16·²Ó1AÐAˆ˜Ô.Ü×&Ò& q¨&¸KÔHˆ
Ø<Ðä“ˆÜ16·²Ó1AÐAˆ˜Ô.Ü05·²Ó0@Ð@ˆ˜Ô-Ü×&Ò& q¨&¸KÔHˆ
ä"'×"4Ò"4ØÐ*¸Tô#
Ð÷	ð 	ð 	 ×+Ñ+Ð,DÔEä×*Ò*Ø$Ð4Àtô
ˆ÷	Fð 	×!Ñ!Ð"8Ô9ö	ð 	×!Ñ! 'Ô*àÐr-   c                ód  € \        4       p\        P                  ! ^ VRR7      pV P                  \        P
                  VP                  P                  R^P4       VP                  P                  R^P4       V P                  \        VP                  P                  R^P4       VP                  4       # )zð
A call to the transport's connect method fails with an
L{InvalidAddressError} when a non-IP address is passed as the host
value.

A call to a transport's connect method fails with a L{RuntimeError}
when the transport is already connected.
rt   ru   Ú	localhost)
ra   r   r‚   rž   r   ÚInvalidAddressErrorrE   r½   ÚRuntimeErrorr|   )r)   rª   r”   s   &  r*   Útest_badConnectÚUDPTests.test_badConnect‡  s�   € ô “ˆÜ× Ò   F°kÔBˆØ×ÑÜ×%Ñ% v×'7Ñ'7×'?Ñ'?ÀÈbô	
ð 	×Ñ× Ñ  ¨bÔ1Ø×Ñœ,¨×(8Ñ(8×(@Ñ(@À+ÈrÔRØ×!Ñ!Ó#Ð#r-   c                óT  a aaaaaaa	€ \         P                  ! 4       oV 3R lpSP                  V4       \        4       o\        P
                  ! ^ SRR7      oV3R lpSP                  V4       SP                  4       o\        \        ^<4      4      o. o	VVVVVV V	3R loS! 4        S# )zZ
When datagramReceived raises an exception it is logged but the port
is not disconnected.
c                óŒ   <€ SP                  \        4      pSP                  \        V4      ^R\        V4      3,          4       R# )za
Flush the exceptions which the reactor should have logged and make
sure they're actually there.
z'Incorrectly found %d errors, expected 2N)ÚflushLoggedErrorsre   rz   Úlen)ÚignÚerrsr)   s   & €r*   ÚcbCompletedÚ8UDPTests.test_datagramReceivedError.<locals>.cbCompleted   s:   ø€ ð
 ×)Ñ)¬.Ó9ˆDØ×ÑÜ�D“	˜1ÐGÌ3ÈtË9È,ÕVör-   rt   ru   c                ól   <a € \         P                  ! SP                  4      P                  V 3R l4      # )z_
Disconnect the port we started and pass on whatever was given to us
in case it was a Failure.
c                ó   <€ S# r&   rA   )rü   Úresults   &€r*   Ú<lambda>ÚHUDPTests.test_datagramReceivedError.<locals>.cbCleanup.<locals>.<lambda>´  s   ø€ Évr-   )r   r   r|   ÚaddBoth)r  r”   s   f€r*   Ú	cbCleanupÚ6UDPTests.test_datagramReceivedError.<locals>.cbCleanup¯  s(   ù€ ô
 ×&Ò& t×'9Ñ'9Ó:×BÑBÔCUÓVÐVr-   c                 ó€  <a€ S'       g    S
P                  R4       S
P                  SP                  RR4       RSP                  ^ 4      3,          p \        P                  ! 4       pSP                  V4       SP                  P                  V SP                  SP                  34       VV	VV3R lpV	3R lpVP                  W#4       VP                  SP                  4       \        P                  ! RVP                  \         P"                  ! R4      4      oR#   \         d    SP                  4         ELi ; i)	zú
Send one packet to the listening BadClient.  Set up a 0.1 second
timeout to do re-transmits in case the packet is dropped.  When two
packets have been received by the BadClient, stop sending and let
the finalDeferred's callbacks do some assertions.
zNot enough packets receivedNzUDP Protocol lost its transportrÓ   c                óÀ   <€ SP                  4        SP                  V 4       \        S4      ^8X  d%   \        P                  ! ^ SP
                  R4       R# S! 4        R# )zU
A packet arrived.  Cancel the timeout for it, record it, and
maybe finish the test.
N)ÚcancelrH   rû   r   Ú	callLaterr3   )ÚpacketÚfinalDeferredÚmakeAttemptÚsucceededAttemptsÚtimeoutCalls   &€€€€r*   ÚcbPacketReceivedÚRUDPTests.test_datagramReceivedError.<locals>.makeAttempt.<locals>.cbPacketReceivedÛ  sL   ø€ ð
 ×"Ñ"Ô$Ø!×(Ñ(¨Ô0ÜÐ(Ó)¨QÔ.ô
 ×%Ò% a¨×)?Ñ)?ÀÖFá–Mr-   c                ó   <€ S! 4        R# )aT  
The packet wasn't received quickly enough.  Try sending another
one.  It doesn't matter if the packet for which this was the
timeout eventually arrives: makeAttempt throws away the
Deferred on which this function is the errback, so when
datagramReceived callbacks, so it won't be on this Deferred, so
it won't raise an AlreadyCalledError.
NrA   )Úerrr  s   &€r*   ÚebPacketTimeoutÚQUDPTests.test_datagramReceivedError.<locals>.makeAttempt.<locals>.ebPacketTimeoutë  s
   ø€ ñ –r-   gš™™™™™¹?z&Timed out in testDatagramReceivedError)ÚfailÚ	ExceptionrT   ÚfailIfIdenticalrE   r´   r   r   rk   r³   r¾   r”   ÚaddCallbacksÚ
addErrbackr   r  r   ÚTimeoutError)r  ÚpacketDeferredr  r  r  rJ   Úattemptsrª   r  r  r)   r  s       @€€€€€€€r*   r  Ú8UDPTests.test_datagramReceivedError.<locals>.makeAttemptÅ  s	  ù€ ÷ ð,Ø—I‘IÐ;Ô<ð × Ñ Ø× Ñ  $Ð(Iôð ˜hŸl™l¨1›oÐ/Õ/ˆFÜ"Ÿ^š^Ó-ˆNØ×Ñ˜~Ô.Ø×Ñ×"Ñ" 6¨D¯I©I°t·y±yÐ+AÔB÷"ð "õ 	ð ×'Ñ'Ð(8ÔJØ×%Ñ% m×&;Ñ&;Ô<ä!×+Ò+ØØ×&Ñ&Ü×"Ò"Ð#KÓLóŠKøôU !ô ,Ø!×)Ñ)×+ð,ús   ŒD ÄD=Ä<D=)
r   r   rƒ   rh   r   r‚   r  ry   ÚlistrÖ   )
r)   rþ   r  rJ   r  rª   r  r  r”   r  s
   f  @@@@@@@r*   Útest_datagramReceivedErrorÚ#UDPTests.test_datagramReceivedError™  s�   ÿ€ ô
 ŸšÓ(ˆõ	ð 	×!Ñ! +Ô.ä“ˆÜ× Ò   F°kÔBˆõ	Wð 	×Ñ˜iÔ(à�|‰|‹~ˆô œ˜b›	“?ˆØÐ÷8	ó 8	ñt 	ŒØÐr-   c                ó  €  ! R R4      p\         P                  ! ^ \        4       4      pV! 4       Vn        VP	                  RR4       V P                  V P                  .4      pV P                  \        V4      ^ 4       R# )a9  
C{'<broadcast>'} is an alternative way to say C{'255.255.255.255'}
({socket.gethostbyname("<broadcast>")} returns C{'255.255.255.255'}),
so because it becomes a valid IP address, no deprecation warning about
passing hostnames to L{twisted.internet.udp.Port.write} needs to be
emitted by C{write()} in this case.
c                  ó   € ] tR tRtR tRtR# )Ú6UDPTests.test_NoWarningOnBroadcast.<locals>.fakeSocketi  c                	ó   € R # r&   rA   )r)   ÚfooÚbars   &&&r*   ÚsendtoÚ=UDPTests.test_NoWarningOnBroadcast.<locals>.fakeSocket.sendto  s   € Ùr-   rA   N)r<   r=   r>   r?   r)  r@   rA   r-   r*   Ú
fakeSocketr%    s   † ör-   r+  s   testN)z<broadcast>iÒ  )	r   ÚPortrC   r   r³   ÚflushWarningsÚtest_NoWarningOnBroadcastrz   rû   )r)   r+  r~   Úwarningss   &   r*   r.  Ú"UDPTests.test_NoWarningOnBroadcast  se   € ÷	ñ 	ô �HŠH�Qœ›Ó!ˆÙ“<ˆŒØ	�‰�Ð.Ô/à×%Ñ% t×'EÑ'EÐ&FÓGˆØ×Ñœ˜X›¨Ö*r-   )r©   N)r<   r=   r>   r?   r…   rŽ   rš   r¥   rÍ   r   ÚosÚenvironÚgetrÝ   rð   rö   r!  r.  r@   rA   r-   r*   rr   rr   …   sh   † ò(ò ?ò(+ò&ò8BñH Ø
�
‰
�‰Ð'Ó(Ð,<Ñ<Ø,óñ'ó	ð'òR:òx$ò$göR+r-   rr   c                  ób   € ] tR tRtRt]P                  ! ]R4      '       g   RtR t	R t
R tRtR# )	ÚReactorShutdownInteractionTestsi  z!Test reactor shutdown interactionNrp   c                ót   € \        4       V n        \        P                  ! ^ V P                  RR7      V n        R# )zStart a UDP portrt   ru   N)rC   r„   r   r‚   r”   r(   s   &r*   ÚsetUpÚ%ReactorShutdownInteractionTests.setUp  s%   € ä“hˆŒÜ×%Ò% a¨¯©ÀÔLˆŽ	r-   c                ó6   € V P                   P                  4       # )zStop the UDP port)r”   r|   r(   s   &r*   ÚtearDownÚ(ReactorShutdownInteractionTests.tearDown#  s   € à�y‰y×&Ñ&Ó(Ð(r-   c                ó†  a a€ \         P                  ! 4       o\         P                  ! 4       ;pS P                  n        VV 3R lpVP	                  V4       V 3R lpSP	                  V4       S P                  P
                  P                  RRS P                  P
                  P                  4       P                  34       S# )z0Test reactor shutdown while in a recvfrom() loopc                ó”   <€ SP                   P                  P                  4        \        P                  ! ^ SP
                  R4       R# r²   )r„   rE   ÚconnectionLostr   r  r3   )r}   Úfinishedr)   s   &€€r*   ÚpktReceÚQReactorShutdownInteractionTests.testShutdownFromDatagramReceived.<locals>.pktRece6  s3   ø€ à�K‰K×!Ñ!×0Ñ0Ô2ô ×Ò˜a ×!2Ñ!2°DÖ9r-   c                ó(   <€ SP                  4        R # r&   )rú   ©r}   r)   s   &€r*   ÚflushErrorsÚUReactorShutdownInteractionTests.testShutdownFromDatagramReceived.<locals>.flushErrors@  s   ø€ ð
 ×"Ñ"Ö$r-   rt   s@                                                                   )	r   r   r„   rD   rƒ   rE   r³   ry   r”   )r)   Úprr@  rD  r?  s   f   @r*   Ú testShutdownFromDatagramReceivedÚ@ReactorShutdownInteractionTests.testShutdownFromDatagramReceived'  s“   ù€ ô —>’>Ó#ˆÜ*/¯.ª.Ó*:Ð:ˆˆT�[‰[Ô'ö	:ð 	�‰�wÔõ	%ð 	×Ñ˜[Ô)Ø�‰×Ñ×#Ñ#Ø˜ d§k¡k×&;Ñ&;×&CÑ&CÓ&E×&JÑ&JÐKô	
ð ˆr-   )r”   r„   )r<   r=   r>   r?   rf   r   ÚIReactorUDPr   Úskipr7  r:  rG  r@   rA   r-   r*   r5  r5    s-   † á+à×!Ò! '¨4×0Ò0Ø2ˆòMò
)ö$r-   r5  c               ó0   € V ^8„  d   QhRRRRRRRRRRR	R
/# )é   Úafr
   ÚipprotoÚintÚjoinÚgroupÚstrÚbindtoÚreturnÚboolrA   )Úformats   "r*   Ú__annotate__rW  N  s<   € ÷ ñ ØðØ #ðØ+.ðØ7:ðØDGðà	ñr-   c                ó:  € \        V \        4      pVP                  V^ 34       \        W4      p\        W4      p VP	                  WWg,           4        VP                  4        R#   \         d     TP                  4        R# i ; i  TP                  4        i ; i)zõ
Bind a socket to the given network interface and attempt to join a
multicast group with the given address family.  This is used to determine
whether the local networking stack configuration allows for multicast
within the given address family.
TF)r   r	   Úbindr   Ú
setsockoptÚcloseÚOSError)rM  rN  rP  rQ  rS  ÚsÚ	packgroupÚpackifs   &&&&&   r*   ÚcheckMulticastAvailabilityr`  N  sƒ   € ô 	ˆr”:Ó€AØ‡F�FˆF�Aˆ;ÔÜ˜"Ó$€IÜ�rÓ"€FðØ	�‰�W IÕ$6Ô7ð à	�‰Ž	øô ô Øð 	
�‰Ž	ðûð
 	
�‰�	ús#   »A& Á&BÁ1B ÂBÂB ÂBz'This reactor does not support multicastú225.0.0.250ú0.0.0.0z:The local networking stack does not enable IPv4 multicast.c                  óÊ  € ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R	&   R
t	R]R&   Rt
R]R&   RtR]R&   RtR]R&   RtR]R&   R tR tR R ltR R ltR R ltR R ltR R lt]! ]P.                  P1                  4       ;'       d     ]P.                  P3                  4       '       * R4      R 4       tR  t]! ]P.                  P1                  4       R!4      R" R# l4       tR$tR%# )&ÚMulticastTestsie  zg
Tests for sending and receiving multicast datagrams.  (This suite supports
IPv4, see below for IPv6.)
rb  rR  rv   ú	str | intÚexpectedInterfacert   ÚclientAddressra  ÚmulticastGroupÚalternateInterfaceró   ÚinterfaceSynonymÚinvalidGroupú::1ÚwrongAddressFamilyc                	ó¾  € \        4       V n        \        4       V n        \        P
                  ! ^ V P                  V P                  4      V n        \        P
                  ! ^ V P                  V P                  4      V n        V P                  P                  P                  V P                  V P                  P                  P                  4       P                  4       R# r²   )rC   r„   rP   rª   r   ÚlistenMulticastrv   r‰   r©   rE   r½   rg  ry   r”   r(   s   &r*   r7  ÚMulticastTests.setUp€  s�   € Ü“hˆŒÜ“hˆŒä×,Ò,¨Q°·±¸T¿^¹^ÓLˆŒ
Ü×,Ò,¨Q°·±¸T¿^¹^ÓLˆŒ
Ø�‰×Ñ×%Ñ%Ø×ÑØ�K‰K×!Ñ!×)Ñ)Ó+×0Ñ0ö	
r-   c                	ó�   € \        \        V P                  P                  4      \        V P                  P                  4      .4      # r&   )r   r   r‰   r|   r©   r(   s   &r*   r:  ÚMulticastTests.tearDown‹  s8   € Üä˜dŸj™j×6Ñ6Ó7Ü˜dŸj™j×6Ñ6Ó7ðó
ð 	
r-   c               ó   € V ^8„  d   QhRR/# ©rL  rT  ÚNonerA   )rV  s   "r*   rW  ÚMulticastTests.__annotate__“  s   € ÷ ñ ˜ñ r-   c                	óÊ   a € S P                   P                  P                  \        8w  d   \	        R 4      hR V 3R llpV! S P
                  4       V! S P                   4       R# )z+only IPv4 multicast has TTLs, IPv6 has hopsc               ó    € V ^8„  d   QhRRRR/# )rL  ÚozServer | ClientrT  ru  rA   )rV  s   "r*   rW  Ú,MulticastTests.testTTL.<locals>.__annotate__—  s   € ÷ 	6ñ 	6˜ð 	6¨Dñ 	6r-   c                ó6  <€ \         P                  ! V P                  4      '       g   Q hSP                  V P                  P	                  4       ^4       V P                  P                  ^4       SP                  V P                  P	                  4       ^4       R# r/   )r   Ú
providedByrE   rz   ÚgetTTLÚsetTTL)ry  r)   s   &€r*   ÚcheckttlÚ(MulticastTests.testTTL.<locals>.checkttl—  sj   ø€ Ü&×1Ò1°!·+±+×>Ò>Ð>Ð>Ø×Ñ˜QŸ[™[×/Ñ/Ó1°1Ô5Ø�K‰K×Ñ˜qÔ!Ø×Ñ˜QŸ[™[×/Ñ/Ó1°1Ö5r-   N)r„   rE   ÚaddressFamilyr   r!   rª   )r)   r  s   f r*   ÚtestTTLÚMulticastTests.testTTL“  sK   ø€ Ø�;‰;× Ñ ×.Ñ.´'Ô9ÜÐHÓIÐI÷	6ð 	6ñ 	�—‘ÔÙ�—‘Ör-   c               ó   € V ^8„  d   QhRR/# rt  rA   )rV  s   "r*   rW  rv     s   € ÷ 6ñ 6 Tñ 6r-   c              ƒ  ó"  "  € V P                   pV P                  V P                  P                  P	                  4       ^4       V P                  P                  P                  4       pV P                  P                  P                  V4      G Rj  x€L
  \        4       V P                  n        V P                  P                  P                  RWP                  34       V P                  P                  G Rj  x€L
  V P                  \        V P                  P                  4      ^4       V P                  P                  P                  ^ 4       V P                  V P                  P                  P	                  4       ^ 4       V P                  P                  P                  RWP                  34       \        \        \         4      ^ 4      G Rj  x€L
  V P                  \        V P                  P                  4      ^4       R#  ELx EL L;5i)z^
Test that after loopback mode has been set, multicast packets are
delivered to their sender.
Nr¯   )rh  rz   r„   rE   ÚgetLoopbackModery   Ú	joinGroupr   rD   r³   r”   rû   r'   ÚsetLoopbackModer   r   r   )r)   rQ  rJ   s   &  r*   Útest_loopbackÚMulticastTests.test_loopback   sm  é € ð
 ×#Ñ#ˆØ×Ñ˜Ÿ™×.Ñ.×>Ñ>Ó@À!ÔDØ�{‰{×$Ñ$×,Ñ,Ó.ˆà�k‰k×#Ñ#×-Ñ-¨eÓ4×4Ð4Ü%-£Zˆ�‰Ô"Ø�‰×Ñ×#Ñ# H¨u·i±iÐ.@ÔAØ�k‰k×(Ñ(×(Ð(à×Ñœ˜TŸ[™[×0Ñ0Ó1°1Ô5Ø�‰×Ñ×-Ñ-¨aÔ0Ø×Ñ˜Ÿ™×.Ñ.×>Ñ>Ó@À!ÔDØ�‰×Ñ×#Ñ# H¨u·i±iÐ.@ÔAô œ¤gÓ.°Ó2×2Ð2Ø×Ñœ˜TŸ[™[×0Ñ0Ó1°1Ö5ò 	5ò 	)ñ 	3ùs8   ‚BHÂHÂA'HÃ7H
Ã8CHÇHÇ6HÈ
HÈHc               ó   € V ^8„  d   QhRR/# rt  rA   )rV  s   "r*   rW  rv  ¸  s   € ÷ ñ °Tñ r-   c              ƒ  ó  "  € V P                  \        4      ;_uu_ 4        V P                  P                  P	                  V P
                  V P                  R7      G Rj  x€L
  RRR4       R#  L  + '       g   i     R# ; i5i)z|
A sensible error will be reported when using the wrong address family
literal for the 'interface' argument to 'joinGroup'.
ru   N)rž   r   r„   rE   r‡  rh  rm  r(   s   &r*   Útest_wrongFamilyInterfaceJoinÚ,MulticastTests.test_wrongFamilyInterfaceJoin¸  si   é € ð
 ×ÑÔ1×2Õ2Ø—+‘+×'Ñ'×1Ñ1Ø×#Ñ#¨t×/FÑ/Fð 2ó ÷ ð ÷ 3Ñ2ñ÷ 3×2Ð2üs.   ‚B ?A0ÁA.Á A0Á$
BÁ.A0Á0B	Á;	Bc               ó   € V ^8„  d   QhRR/# rt  rA   )rV  s   "r*   rW  rv  Â  s   € ÷ 
ñ 
 dñ 
r-   c              ƒ  óâ  "  € V P                  V P                  P                  P                  4       V P                  4       V P                  V P
                  P                  P                  4       V P                  4       V P
                  P                  P                  V P                  4      G Rj  x€L
  V P                  P                  P                  V P                  4      G Rj  x€L
  V P                  V P                  P                  P                  4       V P                  4       V P                  V P
                  P                  P                  4       V P                  4       R#  L¹ L„5i)z;
Test C{getOutgoingInterface} and C{setOutgoingInterface}.
N)	rz   rª   rE   ÚgetOutgoingInterfacerf  r„   ÚsetOutgoingInterfaceri  rj  r(   s   &r*   Útest_interfaceÚMulticastTests.test_interfaceÂ  s  é € ð 	×ÑØ�K‰K×!Ñ!×6Ñ6Ó8¸$×:PÑ:Pô	
ð 	×ÑØ�K‰K×!Ñ!×6Ñ6Ó8¸$×:PÑ:Pô	
ð �k‰k×#Ñ#×8Ñ8¸×9PÑ9PÓQ×QÐQØ�k‰k×#Ñ#×8Ñ8¸×9NÑ9NÓO×OÐOà×ÑØ�K‰K×!Ñ!×6Ñ6Ó8Ø×#Ñ#ô	
ð 	×ÑØ�K‰K×!Ñ!×6Ñ6Ó8Ø×#Ñ#ö	
ñ 	RÙOùs%   ‚B/E/Â1E+Â26E/Ã(E-Ã)BE/Å-E/c               ó   € V ^8„  d   QhRR/# rt  rA   )rV  s   "r*   rW  rv  Ù  s   € ÷ Dñ D dñ Dr-   c              ƒ  óÖ  "  € V P                   P                  P                  V P                  4      G Rj  x€L
  V P                   P                  P	                  V P                  4      G Rj  x€L
  V P
                  P                  P                  V P                  4      G Rj  x€L
  V P
                  P                  P	                  V P                  4      G Rj  x€L
  R#  L« Lv LA L5i)z5
Test that multicast a group can be joined and left.
N)rª   rE   r‡  rh  Ú
leaveGroupr„   r(   s   &r*   Útest_joinLeaveÚMulticastTests.test_joinLeaveÙ  s¦   é € ð �k‰k×#Ñ#×-Ñ-¨d×.AÑ.AÓB×BÐBØ�k‰k×#Ñ#×.Ñ.¨t×/BÑ/BÓC×CÐCØ�k‰k×#Ñ#×-Ñ-¨d×.AÑ.AÓB×BÐBØ�k‰k×#Ñ#×.Ñ.¨t×/BÑ/BÓC×CÒCñ 	CÙCÙBÙCùsE   ‚3C)µC!¶6C)Á,C#Á-6C)Â#C%Â$6C)ÃC'ÃC)Ã#C)Ã%C)Ã'C)z2Windows' UDP multicast is not yet fully supported.c                óœ   € V P                  V P                  P                  P                  V P                  4      \
        P                  4      # )zr
Test that an attempt to join an address which is not a multicast
address fails with L{error.MulticastJoinError}.
)r×   rª   rE   r‡  rk  r   r   r(   s   &r*   Útest_joinFailureÚMulticastTests.test_joinFailureã  s=   € ð ×!Ñ!Ø�K‰K×!Ñ!×+Ñ+¨D×,=Ñ,=Ó>Ä×@XÑ@Xó
ð 	
r-   c                óš  a aaa€ \        4       o\        P                  ! ^ SS P                  4      oS P                  P
                  P                  4       oS P                  P
                  P                  S P                  4      pVVV 3R lpVP                  V4       V 3R lpVP                  V4       V3R lpVP                  V4       V# )zV
Test that a multicast group can be joined and messages sent to and
received from it.
c                ó¢   <€ \        4       ;pSP                  n        SP                  P	                  R SP
                  SP                  34       V# )ó   hello world)r   r„   rD   rE   r³   rh  r”   )r}   r5   rJ   Úcr)   s   & €€€r*   ÚcbJoinedÚ/MulticastTests.test_multicast.<locals>.cbJoinedü  s>   ø€ Ü-5«ZÐ7ˆA�—‘Ô*Ø�K‰K×Ñ˜n¨t×/BÑ/BÀDÇIÁIÐ.NÔOØˆHr-   c                óp   <€ SP                  SP                  P                  ^ ,          ^ ,          R4       R# )r˜   rŸ  N)rz   r„   r'   rC  s   &€r*   ÚcbPacketÚ/MulticastTests.test_multicast.<locals>.cbPacket  s'   ø€ Ø×Ñ˜TŸ[™[×0Ñ0°Õ3°AÕ6¸ÖGr-   c                ó^   <a € \        SP                  4      pVP                  V 3R  l4       V# )c                ó   <€ S# r&   rA   )rü   Úpassthroughs   &€r*   r  Ú@MulticastTests.test_multicast.<locals>.cleanup.<locals>.<lambda>
  s   ø€ ©;r-   )r   r|   rƒ   )r¨  r  r~   s   f €r*   rë   Ú.MulticastTests.test_multicast.<locals>.cleanup  s%   ù€ Ü" 1§?¡?Ó3ˆFØ×ÑÔ6Ô7ØˆMr-   )
rC   r   ro  rv   r„   rE   ry   r‡  rh  rƒ   )r)   Újoinedr¡  r¤  rë   rJ   r   r~   s   f    @@@r*   Útest_multicastÚMulticastTests.test_multicastñ  s¡   û€ ô
 ‹HˆÜ×#Ò# A q¨$¯.©.Ó9ˆØ�{‰{×$Ñ$×,Ñ,Ó.ˆà—‘×&Ñ&×0Ñ0°×1DÑ1DÓEˆ÷	ð
 	×Ñ˜8Ô$õ	Hð 	×Ñ˜8Ô$õ	ð
 	×Ñ˜7Ô#àˆr-   zjon non-linux platforms it appears multiple processes can listen, but not multiple sockets in same process?c               ó   € V ^8„  d   QhRR/# rt  rA   )rV  s   "r*   rW  rv    s   € ÷ .
ñ .
¨ñ .
r-   c              ƒ  ó  "  € \        4       p\        \        4      pVP                  ^ VRV P                  R7      pVP                  4       p\        V\        \        34      '       g   Q hVP                  p\        4       pVP                  VVRV P                  R7      p\        V P                  P                  P                  V P                  4      VP                  V P                  4      VP                  V P                  4      .4      G Rj  x€L
  \        4       ;q�n        \        4       ;q–n        VP                  P#                  RV P                  V34       \        W‰.4      G Rj  x€L
  V P%                  VP&                  ^ ,          ^ ,          R4       V P%                  VP&                  ^ ,          ^ ,          R4       \        \)        VP*                  4      \)        VP*                  4      .4      G Rj  x€L
  R#  Lñ L— L
5i)zŠ
Test that multiple sockets can listen on the same multicast port and
that they both receive multicast messages directed to that address.
T)ÚlistenMultiplerv   NrŸ  )rC   r   r   ro  rv   ry   Ú
isinstancer   r   r”   r   r„   rE   r‡  rh  r   rD   r³   rz   r'   r   r|   )
r)   ÚfirstClientÚmreactorÚ	firstPortÚfpAddrÚportnoÚsecondClientÚ
secondPortÚd1Úd2s
   &         r*   Útest_multiListenÚMulticastTests.test_multiListen  sÅ  é € ô “hˆÜ$¤WÓ-ˆØ×,Ñ,Øˆ{¨4¸4¿>¹>ð -ó 
ˆ	ð ×"Ñ"Ó$ˆÜ˜&¤;´Ð"<×=Ò=Ð=Ð=Ø—‘ˆä“xˆØ×-Ñ-ØØØØ—n‘nð	 .ó 
ˆ
ô à—‘×%Ñ%×/Ñ/°×0CÑ0CÓDØ×#Ñ# D×$7Ñ$7Ó8Ø×$Ñ$ T×%8Ñ%8Ó9ðó
÷ 	
ð 	
ô +3«*Ð4ˆÔ'ä+3«:Ð5ˆÔ(à×Ñ×#Ñ# N°T×5HÑ5HÈ&Ð4QÔRÜ˜R˜HÓ%×%Ð%à×Ñ˜×,Ñ,¨QÕ/°Õ2°NÔCØ×Ñ˜×-Ñ-¨aÕ0°Õ3°^ÔDää˜i×5Ñ5Ó6Ü˜j×6Ñ6Ó7ðó
÷ 	
ò 	
ñ'	
ñ 	&ñ
	
ùs8   ‚DHÄH ÄAHÅ*HÅ+BHÇ9HÇ:HÈHÈH)rª   r‰   r©   r„   N)r<   r=   r>   r?   rf   rv   rM   rf  rg  rh  ri  rj  rk  rm  r7  r:  r‚  r‰  r�  r“  r˜  r   r   ÚplatformÚ	isWindowsÚisVistar›  r¬  r»  r@   rA   r-   r*   rd  rd  e  sÿ   ‡ ñð €IˆsÓØ#,Ð�yÓ,Ø$€M�3Ó$Ø'€N�CÓ'Ø$/Ð˜	Ó/Ø"-Ð�iÓ-Ø#€L�#Ó#Ø#Ð˜Ó#ò	
ò
õõ6õ0õ
õ.Dñ Ø×Ñ×"Ñ"Ó$×GÐG¨W×-=Ñ-=×-EÑ-EÓ-GÔ)GØ<óñ
ó	ð
òñ@ Ø×Ñ×"Ñ"Ó$ð	óô.
óô.
r-   rd  úff03::1ú::z/The local stack does not enable IPv6 multicast.c                  ó°   € ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R	&   ]	! R
 ]
! 4        4       4      tR]R&   ]tR]R&   RtR]R&   ^ tR]R&   RtR]R&   RtR# )ÚMulticastTestsIPv6iH  z;
Tests for sending and receiving IPv6 multicast datagrams.
rÁ  rR  rv   rl  rg  rÀ  rh  c              #  	ór   "  € T F-  q^,          P                  R4      '       g   K"  V^ ,          x € K/  	  R# 5i)r0   ÚloN)Ú
startswith)Ú.0Úidxnms   & r*   Ú	<genexpr>ÚMulticastTestsIPv6.<genexpr>^  s'   é € ÐK™~�e°qµ×1DÑ1DÀT×1JŒˆˆq�Š›~ùs   ‚7¦7re  ri  rj  rk  rf  rt   rm  rA   N)r<   r=   r>   r?   rf   rv   rM   rg  rh  Únextr   ri  rj  rk  rf  rm  r@   rA   r-   r*   rÃ  rÃ  H  sp   ‡ ñð €IˆsÓØ€M�3ÓØ#€N�CÓ#Ù$(ÙK™|œ~ÓKó%Ð˜	ó ð #5Ð�iÓ4Ø€L�#ÓØ#$Ð�yÓ$Ø)Ð˜×)r-   rÃ  )=rf   Ú
__future__r   r1  r   r   r   r   r   r   r   r	   r
   r   r   Úunittestr   Útwisted.internetr   r   r   r   r   r   Útwisted.internet.addressr   r   Útwisted.internet.deferr   r   r   Útwisted.internet.errorr   Útwisted.internet.interfacesr   r   r   Útwisted.internet.taskr   Útwisted.pythonr   Útwisted.test.testutilsr    Útwisted.trial.unittestr!   r"   r$   ÚDatagramProtocolrC   ÚConnectedDatagramProtocolrP   ra   r  re   rh   rI  rr   r5  r`  rd  rÃ  rA   r-   r*   Ú<module>rÙ     s÷  ðñ
õ #ã 	÷÷ ÷ ñ õ ç M× Mß =ß IÑ IÝ 5÷ñ õ
 -Ý "Ý 2ß 5÷ñ ô&	ˆU�H×-Ñ-ô 	ôˆU�H×6Ñ6ô ô.�ô ô�Yô ô@�×)Ñ)ô @ñ, ˆJ×"Ò" 7¨DÓ1Ô1Ð3VÓWôN+ˆxó N+ó XðN+ñb ˆJ×"Ò" 7¨DÓ1Ô1Ð3VÓWô3 hó 3ó Xð3õlñ. Ø×$Ò$ W¨dÓ3Ô3Ø-óñ Ù"Ø�Ð.°¸yó	ô ð Aó	ôV
�Xó V
óó	ðV
ñr Ø×$Ò$ W¨dÓ3Ô3Ø-óð ÙÙ"Ø�, °¸Dó	ô ð 6ó	ô*˜ó *óó ó	ò*r-   