Coroutine transport backed by an AsyncTransport socket.

Synopsis

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

class Transport
    : public TransportIf

Base Classes

Name

Description

TransportIf

Abstract interface for a coroutine‐based socket transport.

Types

Name

Description

WriteInfo

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

Type Aliases

Name

Description

ErrorCode

Type used to report socket errors.

Member Functions

Name

Description

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

Name

Description

newConnectedSocket

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

Protected Data Members

Name

Description

eventBase_

Event base driving this transport.

transport_

Underlying async transport socket.

Created with MrDocs