示例#1
0
    def push(self, binary):
        """
        Pushes the supplied bytes into the tail of the transport.
        Only some of the bytes will be copied if there is insufficient
        capacity available. Use :meth:`capacity` to determine how much
        capacity the transport has.

        :param binary: Data to be pushed onto the transport tail.
        :type binary: ``bytes``
        :raise: - :exc:`TransportException` if there is any Proton error.
                - ``OverflowError`` if the size of the data exceeds the
                  transport capacity.
        """
        n = self._check(pn_transport_push(self._impl, binary))
        if n != len(binary):
            raise OverflowError("unable to process all bytes: %s, %s" % (n, len(binary)))
示例#2
0
 def push(self, binary):
     n = self._check(pn_transport_push(self._impl, binary))
     if n != len(binary):
         raise OverflowError("unable to process all bytes: %s, %s" % (n, len(binary)))
示例#3
0
 def push(self, binary):
     n = self._check(pn_transport_push(self._impl, binary))
     if n != len(binary):
         raise OverflowError("unable to process all bytes: %s, %s" %
                             (n, len(binary)))