Version 1/5
-
Next » -
Current version
Alan McGovern, 10/24/2010 08:20 PM
BanningFiltering IPs
private void BanPeer (ClientEngine engine)
{
// Hook up a handler to the 'BanPeer' event. This is raised
// every time a connection is received or an outgoing connection
// is about to be created. If you wish to close/abort the connection
// just set "BanPeer" to true.
engine.ConnectionManager.BanPeer += delegate(object sender, AttemptConnectionEventArgs e) {
if (e.Peer.ConnectionUri.Host == "192.168.0.5")
e.BanPeer = true;
};
}
[/code]¶
/>