Called by a network stack implementer to receive application-layer
        data for sending on to a remote location.  

        Can optionally take a timeout value.  If no data are available,
        raises NoPackets exception.

        Returns a 2-tuple: flowaddr and data.
        The flowaddr consists of 5 items: protocol, localaddr, localport, 
        remoteaddr, remoteport.

def recv_from_app(timeout=_default_timeout):
        '''
        Called by a network stack implementer to receive application-layer
        data for sending on to a remote location.  

        Can optionally take a timeout value.  If no data are available,
        raises NoPackets exception.

        Returns a 2-tuple: flowaddr and data.
        The flowaddr consists of 5 items: protocol, localaddr, localport, 
        remoteaddr, remoteport.
        '''
        try:
            return ApplicationLayer._from_app.get(timeout=timeout)
        except Empty:
            pass
        raise NoPackets()