예제 #1
0
 public override string ToString()
 {
     return(Version.ToString() + "\t" +
            SubVersion.ToString() + "\t" +
            (string.IsNullOrEmpty(Url) ? " " : Url) + "\t" +
            (string.IsNullOrEmpty(Error) ? " " : Error.Replace('\t', ' ')));
 }
예제 #2
0
        public void SendHandshake()
        {
            if (Socket == null)
            {
                return;
            }

            var sIv = Functions.RandomUInt();
            var rIv = Functions.RandomUInt();

            Socket.Cipher.SetVectors(sIv, rIv);

            var writer = new PacketWriter();

            writer.WriteUShort(0x0E);
            writer.WriteUShort(Version);
            writer.WriteString(SubVersion.ToString());
            writer.WriteUInt(rIv);
            writer.WriteUInt(sIv);
            writer.WriteByte(ServerType);
            Socket.SendRawPacket(writer.ToArray());
        }