0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-10 20:11:07 +01:00
construct/include/ircd/net
2023-04-22 00:21:29 -07:00
..
acceptor.h ircd::net::listener: Support non-SSL listening sockets. 2023-03-18 14:08:20 -07:00
acceptor_udp.h ircd: Internalize various loghead utils; remove legacy ostream operators. 2023-02-09 11:41:11 -08:00
addrs.h ircd::net::addrs: Tweak interface detail; workaround issues. 2019-04-09 20:05:48 -07:00
asio.h ircd::net::socket: Switch to deadline timer. 2019-10-08 19:30:48 -07:00
bpf.h ircd::net::bpf: Add preliminary epbf support. 2022-07-08 10:45:33 -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 close option to skip shutdown syscall prior to close. 2023-03-20 14:01:42 -07:00
dns.h ircd: Various symbol internalizing and PLT reductions. 2022-06-17 21:11:54 -07:00
dns_cache.h ircd::net::dns::cache: Move cache waiter calling out of module. 2020-04-25 00:28:39 -07:00
dns_resolver.h ircd::net::dns::resolver: Fix case sensitivity of the tag host. 2023-04-22 00:21:29 -07:00
hostport.h ircd::net::hostport: Fix condition for service string in rfc3986::uri ctor. 2021-02-09 08:18:28 -08:00
ipaddr.h ircd::net: Fix/improve the v6/v4 check. 2019-08-04 18:05:58 -07:00
ipport.h ircd::net: Fix/improve the v6/v4 check. 2019-08-04 18:05:58 -07:00
listener.h ircd::net::acceptor: Remove backreference to wrapper object. 2023-03-09 10:51:54 -08:00
listener_udp.h ircd: Internalize various loghead utils; remove legacy ostream operators. 2023-02-09 11:41:11 -08:00
net.h ircd: Internalize various loghead utils; remove legacy ostream operators. 2023-02-09 11:41:11 -08:00
open.h ircd::net::socket: Support non-SSL sockets. 2023-03-18 14:08:20 -07:00
read.h ircd::net: Consolidate SSL_pending related behind interface. 2023-03-18 14:08:20 -07:00
README.md
scope_timeout.h
sock_opts.h ircd::net: Add state for nodelay in socket w/ condition to elide; interface overloads. 2023-03-19 19:56:14 -07:00
socket.h ircd::net: Add state for nodelay in socket w/ condition to elide; interface overloads. 2023-03-19 19:56:14 -07:00
wait.h ircd::net::wait: Simplify ctor stack for noexcept suggestion. 2019-09-26 14:03:43 -07:00
write.h ircd::net: Add tools to query socket write buffering related. 2020-12-24 18:09:30 -08:00

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.