Peer.withoutJson constructor
Creates a Peer that communicates using decoded messages over channel
.
Unlike new Peer, this doesn't read or write JSON strings. Instead, it reads and writes decoded maps or lists.
Note that the peer won't begin listening to channel
until
Peer.listen is called.
Implementation
Peer.withoutJson(StreamChannel channel)
: _manager = new ChannelManager("Peer", channel) {
_server = new Server.withoutJson(
new StreamChannel(_serverIncomingForwarder.stream, channel.sink));
_client = new Client.withoutJson(
new StreamChannel(_clientIncomingForwarder.stream, channel.sink));
}