class ConnectToEndpoint

Defined at line 193 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.function/fuchsia.hardware.usb.function/cpp/fidl/fuchsia.hardware.usb.function/cpp/markers.h

Connect to an allocated endpoint.

This must be called after the endpoint has been allocated via [`AllocResources`]. If the

endpoint channel was not provided during `AllocResources`, this method must be called to

establish the endpoint channel before any data transfers can occur on the endpoint.

If the endpoint channels were not provided in `AllocResources` and this is never called, the

protocol client cannot communicate with the endpoint (no channel is established). This does

not prevent control-plane callbacks (like `SetConfigured`) from being made.

The endpoint connection persists across `Configure` and `Deconfigure` calls. If the protocol

server closes the connection (server end closes), it indicates that the endpoint is no

longer available (e.g. device disconnected or function removed). The protocol client should

clean up by closing its client end of the channel, cancelling any pending I/O operations,

and stopping any tasks using the endpoint. The protocol client is not required to call

`DisableEndpoint` or `Deconfigure` in this case (and such calls may fail if the interface is

being torn down).

* error:

* `ZX_ERR_NOT_FOUND` if endpoint address does not exist (e.g. not allocated).

* `ZX_ERR_ALREADY_BOUND` if the endpoint is already bound to an active channel. To

connect a new channel, the existing channel must be closed first. Note that channel

closure detection is asynchronous; if the protocol client closes the existing channel

and immediately calls `ConnectToEndpoint`, it may still fail with

`ZX_ERR_ALREADY_BOUND` if the protocol server has not yet processed the closure.

Public Members

static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal