Dim client As TcpClient = listener.AcceptTcpClient blacklist = IO.File.ReadAllLines(Application.StartupPath & _ "\Blacklist.txt") If blacklist.Contains(GetIp(client).ToString) = False Then 'IP not on blacklist, proceed with processing the client Dim t As New Thread(AddressOf HandleClient) Dim argus() As Object = {client, ClientIdentifier} t.Start(argus) threads.Add(t) clients.Add(client) Else 'Client is on blacklist, close the connection tb("Blacklisted IP tries to connect. Closing connection.") client.Close() End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)