mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
New flag Firewall in the Features field to inform uncontacted peers that a Traverse message might be required to establish a connection. Close #61
This flag can be activated via the config setting LocalFirewall. The Features field exists in Announcement/Response messages and was now added to peer records.
This commit is contained in:
@@ -26,6 +26,12 @@ func (peer *PeerInfo) pingConnection(connection *Connection) {
|
||||
}
|
||||
}
|
||||
|
||||
// Ping sends a ping. This function exists only for debugging purposes, it should not be used normally.
|
||||
// This ping is not used for uptime detection and the LastPingOut time in connections is not set.
|
||||
func (peer *PeerInfo) Ping() {
|
||||
peer.send(&protocol.PacketRaw{Command: protocol.CommandPing, Sequence: networks.Sequences.NewSequence(peer.PublicKey, &peer.messageSequence, nil).SequenceNumber})
|
||||
}
|
||||
|
||||
// Chat sends a text message
|
||||
func (peer *PeerInfo) Chat(text string) {
|
||||
peer.send(&protocol.PacketRaw{Command: protocol.CommandChat, Payload: []byte(text)})
|
||||
|
||||
Reference in New Issue
Block a user