'Retrieve the servername extension value if provided in the client hello
message, or None if there wasn\'t one.
:return: A byte string giving the server name or :py:data:`None`.'

def get_servername(self):

    name = _lib.SSL_get_servername(self._ssl, _lib.TLSEXT_NAMETYPE_host_name)
    if (name == _ffi.NULL):
        return None
    return _ffi.string(name)
