class RpcTransport

Defined at line 55 of file ../../third_party/android/platform/frameworks/native/libs/binder/include/binder/RpcTransport.h

Represents a socket connection.

No thread-safety is guaranteed for these APIs.

Public Methods

status_t pollRead ()

Poll the transport to check whether there is any data ready to read.

Return:

OK - There is data available on this transport

WOULDBLOCK - No data is available

error - any other error

status_t interruptableWriteFully (FdTrigger * fdTrigger, iovec * iovs, int niovs, const std::optional<binder::impl::SmallFunction<status_t ()>> & altPoll, const std::vector<std::variant<binder::unique_fd, binder::borrowed_fd>> * ancillaryFds)

Read (or write), but allow to be interrupted by a trigger.

iovs - array of iovecs to perform the operation on. The elements

of the array may be modified by this method.

altPoll - function to be called instead of polling, when needing to wait

to read/write data. If this returns an error, that error is returned from

this function.

ancillaryFds - FDs to be sent via UNIX domain dockets or Trusty IPC. When

reading, if `ancillaryFds` is null, any received FDs will be silently

dropped and closed (by the OS). Appended values will always be unique_fd,

the variant type is used to avoid extra copies elsewhere.

Return:

OK - succeeded in completely processing 'size'

error - interrupted (failure or trigger)

status_t interruptableReadFully (FdTrigger * fdTrigger, iovec * iovs, int niovs, const std::optional<binder::impl::SmallFunction<status_t ()>> & altPoll, std::vector<std::variant<binder::unique_fd, binder::borrowed_fd>> * ancillaryFds)
bool isWaiting ()

Check whether any threads are blocked while polling the transport

for read operations

Return:

True - Specifies that there is active polling on transport.

False - No active polling on transport

void ~RpcTransport ()

Defined at line 57 of file ../../third_party/android/platform/frameworks/native/libs/binder/include/binder/RpcTransport.h

Friends

class RpcTransportTipcTrusty
class RpcTransportTipcAndroid
class RpcTransportTls
class RpcTransportRaw