ProxyAddress: config.ProxyAddress,
ProxyUsername: config.ProxyUsername,
ProxyPassword: config.ProxyPassword,
- MConfig: connection.DefaultMConnConfig(),
+ MConfig: connection.DefaultMConnConfig(config.Compression),
}
}
return p.isLAN
}
+// Moniker returns peer's moniker.
+func (p *Peer) Moniker() string {
+ return p.NodeInfo.Moniker
+}
+
// PubKey returns peer's public key.
func (p *Peer) PubKey() string {
return p.conn.(*connection.SecretConnection).RemotePubKey().String()
"peer": p.Addr(),
"msg": msg,
"type": reflect.TypeOf(msg),
- }).Info("send message to peer")
+ }).Debug("send message to peer")
return p.mconn.TrySend(chID, msg)
}