def receive(text, connection, **kwargs):
 router = get_router()
 message = router.new_incoming_message(connections=[connection], text=text, **kwargs)
 router.receive_incoming(message)
 return message

def receive ( text , connection , ** kwargs ) : router = get_router ( ) message = router . new_incoming_message ( connections = [ connection ] , text = text , ** kwargs ) router . receive_incoming ( message ) return message
returns first message from deque at key given by share in rx_msgs if any otherwise returns none .