public void SendPackage(PackageOut pkg) { NetManager.sendFunction(pkg); }
public void Send(PackageOut pkg) { if (Connected) { pkg.Pack(); if (_encrypted) { for (int i = 0; i < pkg.length; i ++) { if (i > 0) { SEND_KEY[i % 8]= (byte)((SEND_KEY[i % 8] + pkg.Get(i - 1)) ^ i); pkg.Set(i, (byte)((pkg.Get(i) ^ SEND_KEY[i % 8]) + pkg.Get(i - 1))); } else { pkg.Set(0, (byte)(pkg.Get(0)^SEND_KEY[0])); } } } _socket.Send(pkg.ToByteArray()); } }
public void SendPackage(PackageOut pkg) { _socket.Send(pkg); Log.Debug("Socket SendPackage: [" + pkg.code.ToString() + "," + BitConverter.ToString(pkg.GetByteArray(0, pkg.length)) + "]"); }
public void SendPackage(PackageOut pkg) { var r = new HTTP.Request("GET", _url, pkg.ToByteArray()); r.Send(_OnResponse); Log.Debug("Socket SendPackage: [" + pkg.code.ToString() + "," + BitConverter.ToString(pkg.GetByteArray(0, pkg.length)) + "]"); }