folly::coro::Transport

Coroutine transport backed by an AsyncTransport socket.

Synopsis

Declared in <folly/io/coro/Transport.h>

class Transport
    : public TransportIf

Base Classes

NameDescription
TransportIfAbstract interface for a coroutine-based socket transport.

Types

NameDescription
WriteInfo Result of a write, reporting how many bytes were written.

Type Aliases

NameDescription
ErrorCode Type used to report socket errors.

Member Functions

NameDescription
Transport [constructor]Constructors
operator= Move-assigns a transport.
attachEventBase [virtual]Attaches the transport to the given event base.
close [virtual]Closes the transport.
closeWithReset [virtual]Closes the transport by sending a reset (RST).
detachEventBase [virtual]Detaches the transport from its event base.
getEventBase [virtual]Returns the event base driving this transport.
getLocalAddress [virtual]Returns the local address of the socket.
getPeerAddress [virtual]Returns the remote address of the socket.
getPeerCertificate [virtual]Returns the peer's certificate, if any.
getTransport [virtual]Returns the underlying async transport.
read read overloads
shutdownWrite [virtual]Shuts down the write side of the transport.
write write overloads

Static Member Functions

NameDescription
newConnectedSocket Establishes a TCP connection and returns a Transport wrapping the socket.

Protected Data Members

NameDescription
eventBase_ Event base driving this transport.
transport_ Underlying async transport socket.