4#ifndef SYMBIAN_API_CONNECTIVITY_TCP_CLIENT_H_
5#define SYMBIAN_API_CONNECTIVITY_TCP_CLIENT_H_
13#include "absl/status/status.h"
14#include "absl/status/statusor.h"
15#include "absl/time/time.h"
19struct NativeTcpClient;
21class ActiveTcpListener;
40 std::array<std::uint8_t, 4>
address, std::uint16_t port,
41 absl::Time deadline = absl::InfiniteFuture());
49 std::string_view hostname, std::uint16_t port,
50 absl::Time deadline = absl::InfiniteFuture());
72 absl::Status
Send(std::span<const std::uint8_t>
bytes,
73 absl::Time deadline = absl::InfiniteFuture());
82 absl::StatusOr<std::size_t>
Receive(
83 std::span<std::uint8_t>
bytes,
84 absl::Time deadline = absl::InfiniteFuture());
A single pending RSocket accept managed by a Symbian active scheduler.
Definition active_tcp_listener.h:40
One connected IPv4 TCP stream backed by Symbian RSocket.
Definition tcp_client.h:31
absl::Status SetNoDelay(bool enabled=true)
Disable Nagle buffering for interactive message transports.
Definition tcp_client.cc:89
~TcpClient()
Definition tcp_client.cc:81
TcpClient(const TcpClient &)=delete
TcpClient & operator=(const TcpClient &)=delete
TcpClient & operator=(TcpClient &&other) noexcept
Definition tcp_client.cc:73
absl::Status Send(std::span< const std::uint8_t > bytes, absl::Time deadline=absl::InfiniteFuture())
Complete one native send request of at most 32 KiB by a deadline.
Definition tcp_client.cc:97
static absl::StatusOr< TcpClient > ConnectIpv4(std::array< std::uint8_t, 4 > address, std::uint16_t port, absl::Time deadline=absl::InfiniteFuture())
Connect to four IPv4 octets by an absolute deadline.
Definition tcp_client.cc:25
absl::StatusOr< std::size_t > Receive(std::span< std::uint8_t > bytes, absl::Time deadline=absl::InfiniteFuture())
Receive at least one byte into a buffer of at most 32 KiB.
Definition tcp_client.cc:115
void Close()
Close on the owner thread; repeated calls are harmless.
Definition tcp_client.cc:85
static absl::StatusOr< TcpClient > ConnectHost(std::string_view hostname, std::uint16_t port, absl::Time deadline=absl::InfiniteFuture())
Resolve an ASCII DNS hostname and connect by one deadline.
Definition tcp_client.cc:44
One bounded IPv4 listener backed by Symbian RSocket.
Definition tcp_listener.h:28
Definition active_tcp_listener.cc:11
uint32_t address
Definition exports.cc:69
std::string_view bytes
Definition exports.cc:74
Definition native_tcp_client.cc:19