estaba interesado en un determinado aumento y me gustario decir de que se trata ya que con "determinado aumento" nadie entendera nada.
Bueno para eso quisieres mostrarle un pedazo de codigo de Sb0t 5.38:
El pedazo es demasiado largo asi que se los mostrare desde una pagina web:
https://github.com/AresChat/sb0t/blob/v5.38/core/AresClient.cs
Bueno concentremonos en el metodo de desconeccion que vendira siendo el proceso de ban:
Código
public void Disconnect(bool ghost) { while (this.data_out.Count > 0) { try { byte[] packet; if (this.data_out.TryPeek(out packet)) { this.Sock.Send(packet); Stats.DataSent += (ulong)packet.Length; while (!this.data_out.TryDequeue(out packet)) continue; } else break; } catch { break; } } try { this.Sock.Disconnect(false); } catch { } try { this.Sock.Shutdown(SocketShutdown.Both); } catch { } try { this.Sock.Close(); } catch { } try { this.Sock.Dispose(); } catch { } this.SocketConnected = false; if (!ghost) this.SendDepart(); else if (this.LoggedIn && !this.Quarantined) { this.LoggedIn = false; Events.Parting(this); if (ServerCore.Linker.Busy && ServerCore.Linker.LoginPhase == LinkLeaf.LinkLogin.Ready) ServerCore.Linker.SendPacket(LinkLeaf.LeafOutbound.LeafPart(ServerCore.Linker, this)); Events.Parted(this); } this.LoggedIn = false; }
Y es este aumento:
while (this.data_out.Count > 0)
el data_out.Count el que me interesa. Porque el unico metodo en el que se puede ver un aumento(porque sino siempre tiene menos) es este:
Código:
public void SendPacket(byte[] packet)
{
this.data_out.Enqueue(packet);
}
Y en este metodo SendPacket..... que es lo que se hace para que se aumente el dato_out?
Gracias y saludos