#NEWLINE# def start( self ) : #NEWLINE# #INDENT# callbacks = { #NEWLINE# #INDENT# 'connected' : [ CalvinCB ( self . _connected ) ] , #NEWLINE# #UNINDENT# } #NEWLINE# tcp_f = TCPServerFactory ( callbacks ) #NEWLINE# self . _tcp_server = bt . BtPort ( port = int ( self . _port ) , factory = tcp_f , interface = self . _iface ) #NEWLINE# self . _tcp_server . startListening ( ) #NEWLINE# self . _port = self . _tcp_server . getHost ( ) [ 1 ] #NEWLINE# self . _callback_execute ( 'server_started' , self . _port ) #NEWLINE# return self . _port