0
I am trying to make a Socket system (Server -> <- Client), however I want to make an ip Whitelist that can be accepted in the client connection to the server, but I do not know how, short I want to make system where the Server checks if the ip that is in the "Whitelist" that will be an array, if the ip has la will the client connection will be accepted if there is the ip there won’t connect!.
Server:
public Client(Socket ClientSocket)
{
//Client = this;
this.ClientSocket = ClientSocket;
ClientStream = new NetworkStream(ClientSocket);
EndPoint = (IPEndPoint)ClientSocket.RemoteEndPoint;
ClientThread = new Thread(ClientCallback);
ClientThread.Start();
LogFactory.GetLog(this).LogInfo("Client <{0}> connected to the server!", EndPoint);
}