protected override void ReceiveConnect(ConnectMessage connectMessage) { if (!IgnoreConnects) base.ReceiveConnect(connectMessage); }
public void ConnectMessageTest() { var m = new ConnectMessage(); var d = (ConnectMessage) UdpTrackerMessage.DecodeMessage(m.Encode(), 0, m.ByteLength, MessageType.Request); Check(m, MessageType.Request); Assert.AreEqual(0, m.Action, "#0"); Assert.AreEqual(m.Action, d.Action, "#1"); Assert.AreEqual(m.ConnectionId, d.ConnectionId, "#2"); Assert.AreEqual(m.TransactionId, d.TransactionId, "#3"); Assert.IsTrue(Toolbox.ByteMatch(m.Encode(), d.Encode()), "#4"); }