[][src]Function nng::reflector

pub fn reflector(s1: RawSocket) -> Result<()>

Reflects a socket's sent messages back at itself.

The provided socket must have a protocol that is bidirectional and can peer with itself, such as a pair or bus socket. A reflector or loop-back device is created where valid messages from the socket are simply returned back to the sender.

This function does not return unless the socket encounters an error or is closed. For more information, see the NNG documentation.