/// <summary> /// Hello World /// </summary> /// <param name="dst"></param> /// <param name="packet"></param> /// <param name="encryptor"></param> /// <returns></returns> private int WriteLine(StreamWriter dst, Packet packet, EncryptionProvider encryptor) { byte[] serializedPacket = ToySerializer.Serialize(packet); serializedPacket = encryptor.EncryptArray(serializedPacket); string sendData = Convert.ToBase64String(serializedPacket); dst.WriteLine(sendData); dst.Flush(); return(sendData.Length); }