func (node *HostNode) GetPeerDirection(id peer.ID) network.Direction {
	conns := node.host.Network().ConnsToPeer(id)

	if len(conns) != 1 {
		return network.DirUnknown
	}
	return conns[0].Stat().Direction
}
// GetPeerDirection gets the direction of the peer.
GetPeerDirection gets the direction of the peer.
// GetPeerDirection gets the direction of the peer .
func (node *HostNode) GetPeerDirection(id peer.ID) network.Direction {
	conns := node.host.Network().ConnsToPeer(id)
	if len(conns) != 1 {
		return network.DirUnknown
	}
	return conns[0].Stat().Direction
}
func ( node * HostNode ) GetPeerDirection ( id peer . ID ) network . Direction { conns := node . host . Network ( ) . ConnsToPeer ( id ) if len ( conns ) != 1 { return network . DirUnknown } return conns [ 0 ] . Stat ( ) . Direction }
GetPeerDirection gets the direction of the peer.
GetPeerDirection gets the direction of the peer .