#NEWLINE# def createChannelToEndpoint( self , ipEndpoint ) : #NEWLINE# #INDENT# with self . lock : #NEWLINE# #INDENT# assert ( len ( ipEndpoint ) == 2 ) #NEWLINE# ipEndpoint = ( str ( ipEndpoint [ 0 ] ) , int ( ipEndpoint [ 1 ] ) ) #NEWLINE# assert ( ipEndpoint in self . listeners ) , ( 'No listeners registered on endpoint: %s. Registered listeners: %s' % ( ipEndpoint , self . listeners ) ) #NEWLINE# ( clientChannel , serverChannel ) = StringChannelNative . InMemoryStringChannel ( self . callbackScheduler ) #NEWLINE# rateLimitedServerChannel = self . rateLimitedChannelGroupsForEachListener [ ipEndpoint ] . wrap ( ipEndpoint ) #NEWLINE# self . listeners [ ipEndpoint ] ( rateLimitedServerChannel . makeQueuelike ( self . callbackScheduler ) ) #NEWLINE# return clientChannel