#NEWLINE# def test_rebind( self ) : #NEWLINE# #INDENT# '\n        Re-listening with the same L{DatagramProtocol} re-invokes the\n        C{startProtocol} callback.\n        ' #NEWLINE# server = Server ( ) #NEWLINE# d = server . startedDeferred = defer . Deferred ( ) #NEWLINE# p = reactor . listenUDP ( 0 , server , interface = '127.0.0.1' ) #NEWLINE# def cbStarted( ignored , port ) : #NEWLINE# #INDENT# return port . stopListening ( ) #NEWLINE# #UNINDENT# def cbStopped( ignored ) : #NEWLINE# #INDENT# d = server . startedDeferred = defer . Deferred ( ) #NEWLINE# p = reactor . listenUDP ( 0 , server , interface = '127.0.0.1' ) #NEWLINE# return d . addCallback ( cbStarted , p ) #NEWLINE# #UNINDENT# return d . addCallback ( cbStarted , p )