Crate websocat

Source
Expand description

Note: library usage is not semver/API-stable

Type evolution of a websocat run:

  1. &str - string as passed to command line. When it meets the list of SpecifierClasses, there appears:
  2. SpecifierStack - specifier class, final string argument and vector of overlays.
  3. Specifier - more rigid version of SpecifierStack, with everything parsable parsed. May be nested. When construct is called, we get:
  4. PeerConstructor - a future or stream that returns one or more connections. After completion, we get one or more of:
  5. Peer - an active connection. Once we have two of them, we can start a:
  6. Session with two Transfers - forward and reverse.

Re-exports§

pub use crate::options::Options;
pub use crate::specifier::ClassMessageBoundaryStatus;
pub use crate::specifier::ClassMulticonnectStatus;
pub use crate::specifier::ConstructParams;
pub use crate::specifier::Specifier;
pub use crate::specifier::SpecifierClass;
pub use crate::specifier::SpecifierStack;
pub use crate::util::brokenpipe;
pub use crate::util::io_other_error;
pub use crate::util::simple_err2;
pub use crate::util::wouldblock;
pub use crate::util::box_up_err;
pub use crate::util::multi;
pub use crate::util::once;
pub use crate::util::peer_err;
pub use crate::util::peer_err_s;
pub use crate::util::peer_strerr;
pub use crate::util::simple_err;
pub use crate::specparse::spec;
pub use crate::sessionserve::serve;
pub use http_bytes::http;

Modules§

all_peers
broadcast_reuse_peer
file_peer
foreachmsg_peer
http_peer
jsonrpc_peer
lengthprefixed_peer
line_peer
lints
mirror_peer
net_peer
options
primitive_reuse_peer
process_peer
readdebt
reconnect_peer
sessionserve
socks5_peer
specifier
specparse
ssl_peer
stdio_peer
stdio_threaded_peer
timestamp_peer
trivial_peer
unix_peer
util
ws_client_peer
ws_lowlevel_peer
ws_peer
ws_server_peer

Macros§

list_of_all_specifier_classes

Structs§

LeftSpecToRightSpec
Some information passed from the left specifier Peer to the right
Peer
ProgramState
Session
Transfer
WebsocatConfiguration1
First representation of websocat command-line, partially parsed.
WebsocatConfiguration2
Second representation of websocat configuration: everything (e.g. socket addresses) should already be parsed and verified A structural form: two chains of specifier nodes. Futures/async is not yet involved at this stage, but everything should be checked and ready to do to start it (apart from OS errors)
WebsocatConfiguration3
An immutable chain of functions that results in a Futures or Streams that rely on each other. This is somewhat like a frozen form of WebsocatConfiguration2.

Enums§

L2rUser
PeerConstructor

Functions§

spawn_hack
A remnant of the hack

Type Aliases§

BoxedNewPeerFuture
BoxedNewPeerStream
HupToken
Resolves if/when TCP socket gets reset
L2rReader
L2rWriter
PeerOverlay