
##########################
**Cassandane::Util::Wire**
##########################


****
NAME
****


Cassandane::Util::Wire - record protocol traffic in the test log


********
OVERVIEW
********


For tests that use raw sockets, not instrumented clients,
Cassandane::Util::Wire provides a simple way to log telemetry as we go.

Bytes that aren't printable ASCII are escaped, so a binary body or a stray
control character can't mangle the log.


*********
FUNCTIONS
*********


wire_sent
=========



.. code-block:: perl

     wire_sent($peer, $text);


Log \ ``$text``\  as traffic Cassandane sent to \ ``$peer``\ , a string naming the far
end of the connection -- by convention \ ``host:port``\ .


wire_recv
=========



.. code-block:: perl

     wire_recv($peer, $text);


Log \ ``$text``\  as traffic Cassandane received from \ ``$peer``\ .


