class Protocol
Defined at line 24 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/protocol.h
Holds context for a registered protocol which is pending a connection request.
After successfully registering the protocol, the client is responsible for retaining
the structure in memory (and unmodified) until the connect handler runs.
Thereafter, the protocol may be registered again or destroyed.
# Thread safety
This class is thread-unsafe.
Public Methods
void Protocol (Handler handler)
Defined at line 10 of file ../../sdk/lib/driver/runtime/protocol.cc
void ~Protocol ()
Defined at line 12 of file ../../sdk/lib/driver/runtime/protocol.cc
zx_status_t Register (zx::channel token, fdf_dispatcher_t * dispatcher)
Registers a protocol for |token|.
The connect handler will be scheduled to be called on the dispatcher when a client tries
to connect with the channel peer of |token|. If the connection has already been requested,
the handler will be scheduled immediately.
Transfers ownership of |token| to the runtime.
# Errors
ZX_ERR_BAD_HANDLE: |token| is not a valid channel handle.
ZX_ERR_INVALID_ARGS: |handler| or |dispatcher| is NULL.
ZX_ERR_BAD_STATE|: The dispatcher is shutting down, or if this
has already registered a protocol.
Defined at line 14 of file ../../sdk/lib/driver/runtime/protocol.cc
void Protocol (const Protocol & )
Protocol cannot be moved or copied.
Defined at line 40 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/protocol.h
void Protocol (Protocol && )
Defined at line 41 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/protocol.h
Protocol & operator= (const Protocol & )
Defined at line 42 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/protocol.h
Protocol & operator= (Protocol && )
Defined at line 43 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/protocol.h
bool is_pending ()
Defined at line 63 of file ../../sdk/lib/driver/runtime/include/lib/fdf/cpp/protocol.h