1
using System.Collections.Generic;
2
using NetMQ;
3

4
namespace Libplanet.Net.Messages
5
{
6
    internal class FindNeighbors : Message
7
    {
8
        // TODO: This message may request exact peer instead of its neighbors.
9 1
        public FindNeighbors(Address target)
10 1
        {
11 1
            Target = target;
12 1
        }
13

14 1
        public FindNeighbors(NetMQFrame[] body)
15 1
        {
16 1
            Target = new Address(body[0].ToByteArray());
17 1
        }
18

19 1
        public Address Target { get; }
20

21 1
        protected override MessageType Type => MessageType.FindNeighbors;
22

23
        protected override IEnumerable<NetMQFrame> DataFrames
24
        {
25
            get
26 1
            {
27 1
                yield return new NetMQFrame(Target.ToByteArray());
28 1
            }
29
        }
30
    }
31
}

Read our documentation on viewing source code .

Loading