Natural_Demon
asked on
Build in mini firewall
whit a code like this.
how can i filter ip's?
and set a range on witch i would like to listen too.
how can i filter ip's?
and set a range on witch i would like to listen too.
private void Listener()
{
IPEndPoint from = new IPEndPoint(IPAddress.Any, this.Port);
while (true)
{
try
{
byte[] datagram = Client.Receive(ref from);
string result = Encoding.UTF8.GetString(datagram);
ReceiveString(result);
}
catch
{
}
}
}
sorry, typo, it should be:
you can know....
you can know....
ASKER
i'll check it out, i'll let u hear as soon as posible.
kind regards
kind regards
ASKER
and how to block a ip?
kind regard
kind regard
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try
{
byte[] datagram = Client.Receive(ref from);
string result = Encoding.UTF8.GetString(da
IPAddress addr = from.Address;
if (some condition using the 'addr' object)
ReceiveString(result);
}