template<typename Base = detail::connection_base>
lwip::tcp::connection class

Template parameters
Base The base class to use.

Handle for TCP connections.

Public static functions

static void operator delete(void* ptr, std::size_t sz)
static void operator delete[](void* ptr, std::size_t sz)

Constructors, destructors, conversion operators

template<typename OtherBase, typename... TN>
connection(connection<OtherBase>&& other, TN && ... args)
template<typename Port>
connection(Port& port)

Public functions

void send()
auto send_constant_string(const char* data, size_t len) -> bool
void close()

Function documentation

template<typenameBase>
static void lwip::tcp::connection<Base>::operator delete(void* ptr, std::size_t sz)

Delete operator which uses mem_free if AES70_LWIP_USE_MEM_MALLOC has been defined.

template<typenameBase>
static void lwip::tcp::connection<Base>::operator delete[](void* ptr, std::size_t sz)

Array delete operator which uses mem_free if AES70_LWIP_USE_MEM_MALLOC has been defined.

template<typenameBase> template<typename OtherBase, typename... TN>
lwip::tcp::connection<Base>::connection(connection<OtherBase>&& other, TN && ... args)

Constructor for transforming a TCP connection. The canonical use-case is when a HTTP connection is upgraded into a Websocket.

template<typenameBase> template<typename Port>
lwip::tcp::connection<Base>::connection(Port& port)

Construct a new connection for a Port which has one connection waiting to be accepted.

template<typenameBase>
void lwip::tcp::connection<Base>::send()

Send the buffer which has been previously allocated using allocate.

template<typenameBase>
bool lwip::tcp::connection<Base>::send_constant_string(const char* data, size_t len)

Send a constant string of binary data.

template<typenameBase>
void lwip::tcp::connection<Base>::close()

Close this connection.