Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Changed the listen to listen on Any, added dynamic port usage.
Browse files Browse the repository at this point in the history
Changed the localAddr variable to use IPAddress.Any because any or
methods I've created were unreliable.

Also added Dynamic port usage but because of the multi-threading I'm
sure it's a race condition away from breaking.
  • Loading branch information
PermaNulled committed Jun 7, 2015
1 parent 086e902 commit c6eea8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions XG.Plugin.Irc/BotDownload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ protected override void StartRun()
//Reverse XDCC ( http://content.wow.com/wiki/Fserve#Reverse_.2F_Firewall_DCC )
try
{
Int32 port = 9995;
IPAddress localAddr = IPAddress.Parse("192.168.0.4");
//This is race condition waiting to happen :)
int PortsInUse = NetworkActions.CurPort;
int iPort = NetworkActions.Ports[PortsInUse];
IPAddress localAddr = IPAddress.Any;

//IP retrieval methods are too unreliable, should make this based on either user input or listen on all (Listening on ALL for now).
// IPAddress localAddr = NetworkActions.getLANAddress();
Expand Down

0 comments on commit c6eea8e

Please sign in to comment.