Message-relay protocol implementation.