using System;
using System.Net.Sockets;
namespace OSHttpServer
{
///
/// Invoked when a client have been accepted by the
///
///
/// Can be used to revoke incoming connections
///
public class ClientAcceptedEventArgs : EventArgs
{
private readonly Socket _socket;
private bool _revoke;
///
/// Initializes a new instance of the class.
///
/// The socket.
public ClientAcceptedEventArgs(Socket socket)
{
_socket = socket;
}
///
/// Accepted socket.
///
public Socket Socket
{
get { return _socket; }
}
///
/// Client should be revoked.
///
public bool Revoked
{
get { return _revoke; }
}
///
/// Client may not be handled.
///
public void Revoke()
{
_revoke = true;
}
}
}