#-----------------------------------------------------------------------------# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Standard library importsfromtypingimportAny# Bokeh importsfrom..messageimportEmpty,Message#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('ack',)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------
[docs]classack(Message[Empty]):''' Define the ``ACK`` message for acknowledging successful client connection to a Bokeh server. The ``content`` fragment of for this message is empty. '''msgtype='ACK'
[docs]@classmethoddefcreate(cls,**metadata:Any)->ack:''' Create an ``ACK`` message Any keyword arguments will be put into the message ``metadata`` fragment as-is. '''header=cls.create_header()content=Empty()returncls(header,metadata,content)