Crate rust_tcp_ipc
source ·Expand description
This is a crate for Interprocess Communication via TCP.
It allows for easy, asynchronous sending and receiving messages/commands.
A flexible protocol is used, consisting of a command, a length and a payload.
In detail, it is expected that the used TCP protocol works via exchange of byte collections. A fixed header length is assumed, so - for example - the first 5 bytes of each message encode the message header. The header in turn consists of a command (like Stop, Start, Pause, Load, …) and a length part. Command & length can be in arbitrary order (but have to be fixed for the protocol). Then the next length-many bytes which are received are the payload of the message. Further received bytes form the next message.
An example is given in the Examples.
Macros
Structs
Metadata
.from_str
when the string doesn’t match any of the log levels.Record
.set_logger
if set_logger
has already been called.Enums
try_recv
could
not return data when called. This can occur with both a channel
and
a sync_channel
.Constants
Traits
Read
trait allows for reading bytes from a source.SocketAddr
values.Functions
Box<Log>
.&'static Log
.set_logger
.