def send(self, data, flags=0):
        """send data over the socket connection

        .. note:: this method may block if the socket's send buffer is full

        :param data: the data to send
        :type data: str
        :param flags:
            flags for the send call. this has the same meaning as for
            :meth:`recv`
        :type flags: int

        :returns:
            the number of bytes successfully sent, which may not necessarily be
            all the provided data
        """
        with self._registered('we'):
            while 1:
                try:
                    return self._sock.send(data)
                except socket.error, exc:
                    if exc[0] not in _CANT_SEND or not self._blocking:
                        raise
                    if self._writable.wait(self.gettimeout()):
                        raise socket.timeout("timed out")
                    if scheduler.state.interrupted:
                        raise IOError(errno.EINTR, "interrupted system call")
def send ( self , data , flags = 0 ) : with self . _registered ( 'we' ) : while 1 : try : return self . _sock . send ( data ) except socket . error , exc : if exc [ 0 ] not in _CANT_SEND or not self . _blocking : raise if self . _writable . wait ( self . gettimeout ( ) ) : raise socket . timeout ( "timed out" ) if scheduler . state . interrupted : raise IOError ( errno . EINTR , "interrupted system call" )
send data over the socket connection

        .. note:: this method may block if the socket's send buffer is full

        :param data: the data to send
        :type data: str
        :param flags:
            flags for the send call. this has the same meaning as for
            :meth:`recv`
        :type flags: int

        :returns:
            the number of bytes successfully sent, which may not necessarily be
            all the provided data