'Replacement for self.send() during SSL connections.'

def _ssl_send(self, data):

    try:
        result = self.socket.send(data)
        return result
    except ssl.SSLError as why:
        if (why[0] in (asyncore.EWOULDBLOCK, errno.ESRCH)):
            return 0
        else:
            raise why
        return 0
