|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The transport a remote client connects with, chosen by the frontend it runs under (spec 4 §3). More...
#include <expected>#include <memory>#include <string>#include "../core/backend.hpp"#include "../core/envelope_transport.hpp"#include "../ui/frontend.hpp"Go to the source code of this file.
Classes | |
| struct | morph::client::RemoteTransport |
| A connection to a server: the bridge's backend and its request verb, which are one object. More... | |
Functions | |
| std::expected< RemoteTransport, std::string > | morph::client::makeTransport (ui::AppContext &context, std::string const &url) |
Connects to url with the transport the frontend calls for: a SocketBackend on the context's I/O loop when it has one (the terminal frontend), a QtWebSocketBackend otherwise (Qt Quick). | |
| std::expected< RemoteTransport, std::string > | morph::client::detail::socketTransport (ui::AppContext &context, std::string const &url) |
A SocketBackend on context's loop; defined only where morph::net is built. | |
| std::expected< RemoteTransport, std::string > | morph::client::detail::qtTransport (std::string const &url) |
| A QtWebSocketBackend; defined only where morph::qt is built. | |
The transport a remote client connects with, chosen by the frontend it runs under (spec 4 §3).
Specified in docs/spec/client/client.md.
Definition in file transport.hpp.
|
nodiscard |
Connects to url with the transport the frontend calls for: a SocketBackend on the context's I/O loop when it has one (the terminal frontend), a QtWebSocketBackend otherwise (Qt Quick).
| context | The running frontend's context. |
| url | ws://host:port. |
|
nodiscard |
A SocketBackend on context's loop; defined only where morph::net is built.
| context | The context; its loop must not be null. |
| url | The server. |
|
nodiscard |
A QtWebSocketBackend; defined only where morph::qt is built.
| url | The server. |