0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 17:04:03 +01:00
construct/include/ircd/net
2019-07-14 19:35:28 -07:00
..
acceptor.h ircd::net::acceptor: Elide the accepting list for single-accept [revertible]. 2019-06-01 17:10:49 -07:00
acceptor_udp.h ircd::net: Fix acceptor's inheritance of net::listener::error. 2019-03-13 13:11:53 -07:00
addrs.h ircd::net::addrs: Tweak interface detail; workaround issues. 2019-04-09 20:05:48 -07:00
asio.h ircd::net: Refactor dual stack integration. 2019-03-24 19:33:03 -07:00
check.h ircd::net::socket: Add non-blocking check() query with interface. 2019-03-12 18:41:05 -07:00
close.h ircd::net: Add conf item for default close opts. 2018-06-01 04:08:20 -07:00
dns.h ircd::net::dns: Minor cleanup. 2019-05-03 16:09:57 -07:00
hostport.h ircd::net::hostport: Remove unique symbol. 2019-07-14 19:35:28 -07:00
ipaddr.h ircd::net: Make various conversions to ipaddr explicit. 2019-04-09 15:54:22 -07:00
ipport.h ircd: Degrade enum addressing for clang. 2019-06-23 07:37:23 -06:00
listener.h ircd::net::acceptor: Track and limit operations based on configuration. 2019-06-01 17:10:49 -07:00
listener_udp.h ircd: Misc fixes for clang. 2019-06-23 16:22:06 -06:00
net.h ircd::net: Add conf item to toggle ipv6 for ircd::net::. Auto-detect viability on net::init. 2019-03-25 15:18:06 -07:00
open.h ircd::net: Send server name identification when opening client connections. 2019-03-13 13:44:41 -07:00
read.h
README.md ircd: Start a README.md for any directory missing one; fix conformity of existing. 2019-01-26 12:29:08 -08:00
scope_timeout.h
sock_opts.h ircd::net: Interface support for sockopt IPPROTO_IPV6 IP_V6ONLY. 2019-03-24 16:20:05 -07:00
socket.h ircd::net::socket: Convert totals counters to stats::items. 2019-07-11 15:51:09 -07:00
wait.h ircd: Mark recommended noexcept on inline constructors. 2019-06-22 17:36:42 -06:00
write.h

Network Interface

open()

The open() call combines DNS resolution, TCP connecting and SSL handshaking. A dedicated options structure is provided to tweak the specifics of the process.

close()

Like the open() sequence, the close() sequence composes a complex of multiple operations to close_notify the SSL session with cryptographic soundness and then disconnect the TCP session. A dedicated options structure is provided to tweak details.

Conveyance

Four strategies are available to work with the socket. We have it all covered. The read() and write() suites contain functions postfixed by their behavior:

_all()

A call to read_all() or write_all() will yield the calling ircd::ctx until the supplied buffers are filled or transmitted, respectively.

It is strongly advised to set a timeout in the options structure when making calls of this type.

An ircd::ctx is required to make this call, it does not work on the main stack.

_few()

A call to *_few() also yields the ircd::ctx, but the yield only lasts until some data is sent or received. Once some activity takes place, as much as possible is accomplished; there will not be any more yielding.

It is strongly advised to set a timeout in the options structure when making calls of this type.

An ircd::ctx is required to make this call, it does not work on the main stack.

_any()

A call to *_any() has true non-blocking behavior. It does not require an ircd::ctx. This call tries to conduct as much IO as possible without blocking. Internally it may be a loop of the _one() strategy that works through as much of the buffers until error.

_one()

A call to *_one() also has true non-blocking behavior and does not require an ircd::ctx. This call makes one syscall which may not fill or transmit all of the user buffers even if the kernel has more capacity to do so. To maximize the amount of data read or written to kernelland use the _any() strategy.